CKeditor : phpRS Fórum
Máte dotaz ohledně CKeditoru/FCKeditoru pro phpRS?
phpRS - redakční a informační systém
Jít na stránku:  12Další
Aktuální stránka:1 z 2
uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-07-25, 00:38

Prominte, ale učim se Česky a momentálny neumim psat ...

I am using FCKeditor 2.3 and webpages are in utf-8.
When I write (on Linux) Czech text (= pasting from a text document) in FireFox, Czech characters appear correct.
In FireFox on a Win PC it works fine too.
In IE I have very strange characters.

When we try to enter Czech characters from a Czech Win PC using IE or FireFox, I see strange characters in FireFox and IE on a English language PC (Win and Linux).

When we use a textarea instead of FCKeditor, all works well.

At the moment, we do not know how to solve this problem. Did anyone experience it and how was it solved ?

Kind regards, Nico

Re: uft-8 problemy
Zaslán uživatelem/kou: pa3k (IP adresa zaznamenána)
Datum: 2006-07-25, 10:47

Hi,
try this setting in fckconfig.js
FCKConfig.ForcePasteAsPlainText = true ;
FCKConfig.AutoDetectPasteFromWord = false ; // IE only.

If You want fix bad insertion (empty paragraph instead new line) in MSIE:
FCKConfig.UseBROnCarriageReturn = true ; // IE only.

Re: uft-8 problemy
Zaslán uživatelem/kou: Michalek (IP adresa zaznamenána)
Datum: 2006-07-25, 12:24

What exactly is "strange character"?

Standard FCKEditor has function, which replace (not only) czech character to html entities.

Text "České švýcarsko" looks in source code as "České Švýcarsko".

I have trouble with this every time, when I install FCKEditor... Maybe this is the problem? If not, please take a screenshot :-) Or give us better description of "strange character".

--
[ SAFUS.EU | OFFLINE | FOREVER ]



Celkem upraveno 1×. Poslední úprava Michalek v 25.07.2006 12:24.

Re: uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-07-25, 12:44

pa3k: Thank you for the suggestions. I have changed all settings.
Proper testing will be done today, I will provide feedback of the results in this forum :)

Michalek: Also thank you for the feedback. I have take screenshots, downloadable from www.nicodenboer.com/fck.zip.
When a Czech translation is entered in a Czech PC, I can read it on my English Linux system. But characters are distored as you can see in the screenshots (Windows and Linux). On MS IE I cannot open my page, since it generates a Ajax error. When I past the HTML code from another document into the editor, using Linux/FireFox, and save the info, all is OK on all systems and browsers.
The strange characters are no HTML entity codes, but characters which cannot be displayed in the characterset of the page (utf-8).
We do not have this problem is we simply use a text area with raw HTML code.

This is all I can tell so far. Today we will do more testing.
We live in the Czech Republic, we hope to stay here for the rest of our life, so it would be nice if I could also help Czech people. It helps to better learn Czech :) So, this Czech language features are very important to us.

Re: uft-8 problemy
Zaslán uživatelem/kou: Michalek (IP adresa zaznamenána)
Datum: 2006-07-25, 12:57

Ok, budu psát česky :-)

Vypadá to na problém kódování. Možná ve stránce není
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
?

Prohlížeč na Linuxu pravděpodobně pozná, že se jedná o UTF8 a tak se přepne; prohlížeč na Windows to třeba nepozná. Ono se to takhle na dálku špatně odhaduje, nebyl by odkaz, kde by se poškozená čeština dala vidět?

Teď mě napadá - možná budou soubory FCKeditoru například ve windows-1250, ale vkládají se do stránky utf-8 a je problém tady...

===========
Looks like problem with encoding :-)
Maybe in page isn't
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
?

Browser on Linux probably recognise utf-8 encoding, browser od Windows not. It's hard to say "from head", any link on page where it is?

Idea: Maybe FCKeditor's files are in windows-1250, your page is in utf-8, so... But I don't know...

--
[ SAFUS.EU | OFFLINE | FOREVER ]

Re: uft-8 problemy
Zaslán uživatelem/kou: Michalek (IP adresa zaznamenána)
Datum: 2006-07-25, 13:07

Když nad tím tak přemýšlím, asi nemá cenu hledat problém v databázi, stránkách nebo administraci. Vzhledem k tomu že bez FCKEditoru to funguje, bude chyba asi v něm. Tak se omlouvám za blbé návrhy předtím.

Zkusil bych tedy kouknout, v jakém kódování jsou soubory FCKEditoru, jak navrhuji v minulém příspěvku.
==

Ehm, probably problema aren't in database, pages or administration. Problem is in FCKEditor, so I'm sorry for bad ideas...

So, problem is maybe described in the last message, encoding of FCKEditor's files.

--
[ SAFUS.EU | OFFLINE | FOREVER ]



Celkem upraveno 1×. Poslední úprava Michalek v 25.07.2006 13:08.

Re: uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-07-25, 13:21

I am sorry, we can speak normally with our sousede, but these technical words are new for me and difficult. So I have to write English :(

All pages have the correct utf-8 header.
You can see that on [http://www.mod4u.org/index-cz.htm] (click Přihlásit se). All is written in PHP5. Translations you see there are translated using a textarea.

I have checked the backup of translation data (in MySql). This backup is also in utf-8. In the backup I see that translated text from a textarea is readable, translated text from FCKeditor cannot be recognised. So, it looks like FCK editor is doing something with the data BEFORE it is sended to the server.

Maybe the problem is the windows-1250 of FCK files. But this is config and localisation. I assume a JavaScript edits the data (like formatting or syntax check) before sending it back (POST) to the server. I also use [http://www.xajaxproject.org/] for Ajax and that JavaScript does not have any problem with Czech characters. Maybe FCK uses JavaScript functions which are not compatible with special Czech characters (because only those are distorted) ?

I am just thinking and write my thoughts here... :)

Re: uft-8 problemy
Zaslán uživatelem/kou: Michalek (IP adresa zaznamenána)
Datum: 2006-07-25, 13:30

Ups, hlavička na té stránce "Přihlásit se" je
<meta http-equiv="content-type" content="text/html; charset="utf-8" />
přebývá tam jedna uvozovka.

Možná, že standardní textarea si s tím poradí, ale FCKeditor si vezme špatnou hodnotu z hlavičky? Jen další tip.

==
In header of page "Přihlásit se" is one additional "
<meta http-equiv="content-type" content="text/html; charset="utf-8" />

Maybe, standard textarea haven't problem. But FCKEditor take "bad" utf-8 header? Only next tip.

--
[ SAFUS.EU | OFFLINE | FOREVER ]

Re: uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-07-25, 13:41

The header is:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xml:lang="nl" lang="nl" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Inloggen</title>
<meta http-equiv="content-type" content="text/html; charset="utf-8" />
<meta name="author" content="Nico den Boer, info@denboer-ims.nl" />
<meta name="copyright" content="Copyright 2005 - 2006 IMS, http//www.denboer-ims.nl" />
<link rel="stylesheet" type="text/css" href="https://www.mod4u.org/dotnet/styles.css" media="screen" />
<link rel="stylesheet" type="text/css" href="https://www.mod4u.org/dotnet/print.css" media="print" />

<script type="text/javascript">
var xajaxRequestUri="https://www.mod4u.org/portal/ajaxServer/";
var txtProcessing = "Het verzoek wordt verwerkt...";
</script>
<script type="text/javascript" src="https://www.mod4u.org/dotnet/scripts/scripts.js"></script>
</head>

And, in Czech locale is set to setlocale(LC_ALL, "cs_CZ.utf8");

The line <?xml version="1.0" encoding="utf-8"?> has no value, unless XML data is included (but works in IE only, not in FireFox).

So, which header could be bad ?
<meta http-equiv="content-type" content="text/html; charset="utf-8" />
or
<?xml version="1.0" encoding="utf-8"?>

I am sorry that this takes so long. I wonder if I am the only one who experiences this problem...

Re: uft-8 problemy
Zaslán uživatelem/kou: Michalek (IP adresa zaznamenána)
Datum: 2006-07-25, 13:45

In my last message is the bad " strong, but it's not visible :-)

<meta http-equiv="content-type" content="text/html; charset="utf-8" />
............................................................I


" above I

Right version:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

--
[ SAFUS.EU | OFFLINE | FOREVER ]



Celkem upraveno 1×. Poslední úprava Michalek v 25.07.2006 13:46.

Re: uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-07-25, 14:04

Aha ! I did not see that so far. Thank you very much for this contribution !!!!

So, I will do some testing today and provide feedback on this forum.

Kind regards, Nico

Re: uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-09-29, 18:08

Hello, I am sorry it took long to reply. Lots of work :)
We have found the solution.
In FireFox all was OK.
In MS IE we found out that the utf-8 characterset was not recognised by the browser.
This became visible in MS IE 7.0.

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
is not enough for IE. IE then used the default characterset of the browser.

One extra line in the code solved it:
header("Content-type: text/html; charset=utf-8");
After that all Czech characters are displayed properly in West European browsers.

That was all !

Kind regards, Nico

Re: uft-8 problemy
Zaslán uživatelem/kou: Michalek (IP adresa zaznamenána)
Datum: 2006-09-29, 19:47

:-) Today I have exactly the same problem, This line fixed it :-)

--
[ SAFUS.EU | OFFLINE | FOREVER ]

Re: uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-09-29, 20:01

Wow, timing :) I am happy that it helped you too.

May I ask a totally different question ? If so, read on. If not, ignore the rest ;)

It looks like in the future I will need one or more programmers assisting me with PHP5 and Java programming.
In the Czech Republic I have a živnost (I work alone). My problem currently is that complicated law here makes it too risky to hire collegues permantently. So, I need to work based on projects.

One customer of me NOW needs a Java programmer to take over a JSP project.
Work for me/my product is PHP5/JavaScript only.
Programmers may have a živnost (which is the easiest for administration) or will be hired based on a contract for a project.

When I would like to find English speaking Czech programmers, where should I look (forums perhaps) ?

Maybe I picked the wrong place to ask, but, who knows ...

Kind regards,
Nico

Re: uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-09-29, 20:06

Oh.. for PHP all little bits could help. So a student who wants to earn a bit extra would also be welcome ;)
If you could give me one or more tips, I would appreciate that.
We could also communicate using ICQ, MSN, Yahoo, Skype or VoipBuster. And regular phone of course.

Čau, Nico

Re: uft-8 problemy
Zaslán uživatelem/kou: Michalek (IP adresa zaznamenána)
Datum: 2006-09-30, 00:46

You can try for example [http://diskuse.jakpsatweb.cz/index.php?action=vtopic&forum=26] ...

--
[ SAFUS.EU | OFFLINE | FOREVER ]

Re: uft-8 problemy
Zaslán uživatelem/kou: nicodenboer (IP adresa zaznamenána)
Datum: 2006-10-02, 14:28

Aha... Thank you ! It looks good....

Kind regards, Nico

Re: uft-8 problemy
Zaslán uživatelem/kou: gord007 (IP adresa zaznamenána)
Datum: 2007-01-10, 16:07

Mám asi ten stejný problém. Místo "Vážení spoluobčané" se mi do databáze uloží" V&aacute;žen&iacute; spoluobčan&eacute;" .... Kódování mám taky UTF-8.
Jak jste to teda nakonec vyřešili?? Prosím poraďte

PS: Neumím moc anglicky.

EDIT:
FCKConfig.ProcessHTMLEntities		= false ;
FCKConfig.IncludeLatinEntities		= false ;
FCKConfig.IncludeGreekEntities		= false ;
nepomůže

[http://www.rozsec.cz] - [http://www.czechppm.cz]



Celkem upraveno 1×. Poslední úprava gord007 v 10.01.2007 16:11.

Re: uft-8 problemy
Zaslán uživatelem/kou: gord007 (IP adresa zaznamenána)
Datum: 2007-01-10, 18:56

Tak
FCKConfig.ProcessHTMLEntities		= false ;
FCKConfig.IncludeLatinEntities		= false ;
FCKConfig.IncludeGreekEntities		= false ;

pomůže, ale jenom v IE. V Mozille ne! Poradí někdo

[http://www.rozsec.cz] - [http://www.czechppm.cz]

Re: uft-8 problemy
Zaslán uživatelem/kou: pa3k (IP adresa zaznamenána)
Datum: 2007-01-10, 19:15

žeby mymazanie cache?

Jít na stránku:  12Další
Aktuální stránka:1 z 2


Lituji, ale pouze registrovaní uživatelé mohou zasílat příspěvky do této sekce.
This forum powered by Phorum and designed by STaNBoSS.