|
UTF-8
Sept 14, 2008 10:31:35 GMT -5
Post by gambatte64 on Sept 14, 2008 10:31:35 GMT -5
Greymätter is a great tool!
I would like to add also topics with Japanese characters and changed therefore the character set in the header template to utf-8.
Unfortunately not all Japanese characters appear readable on screen.
Your advice is very much appreciated.
Alfred.
|
|
|
UTF-8
Sept 15, 2008 16:28:51 GMT -5
Post by coldstone on Sept 15, 2008 16:28:51 GMT -5
Is it the blog screens that have trouble? Or the admin screens? I would think the templates would take care of the blog screens, but they won't impact the admin side. You would have to make a small code change to one of the Greymatter Libraries (I can tell you where if you want).
|
|
|
UTF-8
Sept 16, 2008 15:00:14 GMT -5
Post by gambatte64 on Sept 16, 2008 15:00:14 GMT -5
Hello I've made 5 screenshots to illustrate the error. You can find them here (hopefully): www.aisthesia.at/cgi-bin/webgallery/webgallery.cgiNot all Japanese character are garbled only 1 in a word, as it seems to me. The German Umlaute are displayed correctly. I'm using Mozilla Firefox 3.0 and Internet Explorer 7.0 on Windows XP, but can produce the same error on a Windows 98 PC with a previous version of Firefox and with Internet Explorer 6.0. The webserver is a Apache 2.0. Thank you for supporting me further. Alfred.
|
|
|
UTF-8
Sept 19, 2008 10:58:01 GMT -5
Post by coldstone on Sept 19, 2008 10:58:01 GMT -5
Gotcha. It looks like the characters no longer appear correctly after the page has been saved. There is some sanitization that goes on when a page is saved. I think Greymatter is changing the characters when it tries to sanitize the file (for wonky newlines and stuff like that).
You could try commenting out those lines (let me know if you need more info), and see if that does it. The fact that preview works is what makes me suspicious of the entry saving process.
|
|
|
UTF-8
Sept 20, 2008 13:14:25 GMT -5
Post by gambatte64 on Sept 20, 2008 13:14:25 GMT -5
I'd appreciate the information where I could try to comment something out. Previously I used Japanese characters in a topic of my greymatter site ( www.aisthesia.at/archives/00000013.html). I was using normal and default Western encoding, and it worked in that sense, that Japanese characters, also mixed with German characters, were displayed correctly. But Greymatter turned all Japanese characters into special codes (see below), which makes it impossible to edit the text later. An additional motivation for me to go to UTF-8 is the fact, that the site with Western default encoding is not displayed nicely in Japan on Japanese PCs. I can always fall back to the working solution mentioned above, but a fully UTF-8 compatible site would be fine. Thanx. Alfred. --------------- www.aisthesia.at/archives/00000013.html<center><font color="" size="+1"><b>|AMP|#12500;|AMP|#12450;|AMP|#12494;|AMP|#12522;|AMP|#12469;|AMP|#12452;|AMP|#12479;|AMP|#12523; 2008|AMP|#24180;1|AMP|#26376;18|AMP|#26085;|AMP|#65288;|AMP|#37329;|AMP|#65289;|AMP|#21320;|AMP|#24460;7|AMP|#26178; |AMP|#12450;|AMP|#12540;|AMP|#12488;|AMP|#12501;|AMP|#12457;|AMP|#12540;|AMP|#12521;|AMP|#12512;|AMP|#12354;|AMP|#12374;|AMP|#12415;|AMP|#37326;</font> Friday 18 January 2008 7:00 pm ART FORUM AZAMINO <font color="" size="+1">in |AMP|#27178;|AMP|#27996; |AMP|#12472;|AMP|#12517;|AMP|#12531;|AMP|#12467;|AMP|#12539;|AMP|#12502;|AMP|#12522;|AMP|#12540;|AMP|#12512;|AMP|#65309;|AMP|#12458;|AMP|#12459;|AMP|#12505;|AMP|#65288;|AMP|#12500;|AMP|#12450;|AMP|#12494;|AMP|#65289;<br />|AMP|#12288; |AMP|#12302;|AMP|#12466;|AMP|#12473;|AMP|#12488;|AMP|#20986;|AMP|#28436;|AMP|#12303;|AMP|#12288;|AMP|#28193;|AMP|#36794;|AMP|#26149;|AMP|#24422;|AMP|#65288;|AMP|#12501;|AMP|#12523;|AMP|#12540;|AMP|#12488;|AMP|#65289;</font></b> .... </center>
|
|
|
UTF-8
Sept 30, 2008 22:59:35 GMT -5
Post by coldstone on Sept 30, 2008 22:59:35 GMT -5
I think you would want to modify the libs/Gm_Utils.pm file. Make a backup before making changes of course.
You'll want to put a '#' at the beginning of lines after 'sub sanitizeInput {' to the next '}' character several lines below. The problem is that several of these subroutines are called, including sanitize and some 'make safe', that may be messing with the character.
|
|
|
UTF-8
Oct 1, 2008 3:29:57 GMT -5
Post by gambatte64 on Oct 1, 2008 3:29:57 GMT -5
This exactly helped me! I commented these lines in Gm_Utils.pm out sub sanitizeInput { my $s = shift(@_); my $l = defined( $s ) ? $s : Gm_Constants::EMPTY; # removing smart quotes, etc. # $l =~ s/\x91/\'/g; # $l =~ s/\x92/\'/g; # $l =~ s/\x93/\"/g; # $l =~ s/\x94/\"/g; # $l =~ s/\x96/\-/g; # $l =~ s/\x97/\-/g; return($l); } and it worked. Thanks a lot. Alfred
|
|
|
UTF-8
Oct 2, 2008 9:50:08 GMT -5
Post by coldstone on Oct 2, 2008 9:50:08 GMT -5
I am glad it worked, but that means I have to find another way to remove smart quotes from text that is pasted in. That subroutine is trying to clean up weird characters from MS Word and other word processing programs.
|
|