|
Post by stewiedv on Apr 14, 2008 18:09:12 GMT -5
Windows Server, upgraded from 1.3.1 to 1.8.1, and now any word with an apostrophe, or other such marks, now post with odd ascii characters instead of the correct ones. So, for example, "How's" shows up as "How’s" and "..." shows as "…" Any ideas?
|
|
|
Post by coldstone on Apr 14, 2008 22:57:14 GMT -5
Hmm, that is kinda funky. I put in some 'scrubbing' lines that I thought would fix that type of thing, but maybe its not quite working. If you are comfortable editing the files, you can edit libs/Gm_Utils.pm to change these lines around 132:
$l =~ s/\x91/\'/g; $l =~ s/\x92/\'/g; $l =~ s/\x93/\"/g; $l =~ s/\x94/\"/g; $l =~ s/\x96/\-/g; $l =~ s/\x97/\-/g; to:
# $l =~ s/\x91/\'/g; # $l =~ s/\x92/\'/g; # $l =~ s/\x93/\"/g; # $l =~ s/\x94/\"/g; # $l =~ s/\x96/\-/g; # $l =~ s/\x97/\-/g;
And see if that fixes the issue. You can make a backup before you change the file, so its easier to switch back if things don't work out. In theory though, smartquotes, etc. should be turned into normal asci ones.
What version of Greymatter did upgrade from? And do you paste your entries into Greymatter from Word?
|
|
|
Post by stewiedv on Apr 16, 2008 17:08:37 GMT -5
Upgrade was from 1.3.1 to 1.8.1 It still happens after the file update. The entries were pasted from word docs, so I tried saving as txt files and pasting, but the charachters are still incorrect. However, it stilll must be a paste issue, because if I manually type in the ' then the entry shows up fine.
|
|
|
Post by coldstone on Apr 18, 2008 17:06:15 GMT -5
Strange, I thought saving as a text file would have gotten Word's non-ascii characters. With more research I hope to find a way to remove the non-ascii characters.
|
|
|
Post by Carlos Phelps on Apr 20, 2008 14:06:44 GMT -5
Guys this may not be a Greymatter problem. It is most likely caused by a Charset mis-match; the Windows Web Server may be sending a Charset that is difference than what is needed by the Web document and unless the Web document explicitly sets the Charset it may be rendered incorrectly. See the following link www.w3.org/International/O-HTTP-charset.en.phpBest of luck, Carlos
|
|
|
Post by stewiedv on Apr 21, 2008 10:44:31 GMT -5
Guys this may not be a Greymatter problem. It is most likely caused by a Charset mis-match; the Windows Web Server may be sending a Charset that is difference than what is needed by the Web document and unless the Web document explicitly sets the Charset it may be rendered incorrectly. See the following link www.w3.org/International/O-HTTP-charset.en.phpBest of luck, Carlos Thx for the info, I'll check this out. However, the problem only happened once I upgraded gm from 1.3.1 to 1.8.1.
|
|
|
Post by coldstone on Apr 21, 2008 14:14:08 GMT -5
I think this is something we the developers would act on. I think I may have removed part of the Content-Type declaration during a recent refactoring of the code. I have to investigate more, but there is something you could try if you want.
On line 587 of Gm_Web.pm change:
my %headers = ( 'Content-Type'=>'text/html', %params );
To:
my %headers = ( 'Content-Type'=>'text/html; charset=utf-8', %params );
If you get a chance, let me know.
|
|
|
Post by stewiedv on Apr 22, 2008 14:09:46 GMT -5
Will try that - thx
|
|