foreverlarz / sappho

Automatically exported from code.google.com/p/sappho
0 stars 0 forks source link

utf-8 #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
convert from iso-8859-1 to utf-8.

Original issue reported on code.google.com by lucasreddinger on 13 Aug 2008 at 3:42

GoogleCodeExporter commented 8 years ago
we don't need this right away.

Original comment by lucasreddinger on 8 Sep 2008 at 9:38

GoogleCodeExporter commented 8 years ago
we'll go ahead and accept this for the future. this remains low priority.

Original comment by lucasreddinger on 15 Sep 2008 at 5:08

GoogleCodeExporter commented 8 years ago
here's a problem that i've found with the lacking utf-8 support:

in an image caption, i typed some greek words. when firefox submitted the form 
data
to the server, it converted the characters to HTML NCR (numerical character
references, e.g., "Κ").

but the global.php script doesn't expect HTML NCR to already be in the 
database. it
converts "&" to "&". so all of the greek characters would break when run through
output() in global.php.

for now, i'm utilizing a feature of php's htmlspecialchars(): $double_encode! 
i'm
using the function htmlspecialchars() now and setting $double_encode to false.

once we get unicode working, we won't have to worry about browsers sending HTML 
NCR
to the server, so we won't have to worry about handling previously-encoded data.

for now, though, this works.

thanks, r53!

Original comment by lucasreddinger on 9 Oct 2008 at 7:59

GoogleCodeExporter commented 8 years ago
however, now we are converting more than just ampersands into NCR, including
less-than and greater-than symbols. so we can't put html into the database. :(

we need utf-8 support soon! (or maybe some text-formatting code?)

Original comment by lucasreddinger on 9 Oct 2008 at 8:03

GoogleCodeExporter commented 8 years ago
let's use htmlentities() instead of htmlspecialchars() for robustness. [r56]

Original comment by lucasreddinger on 9 Oct 2008 at 8:21

GoogleCodeExporter commented 8 years ago
resolved with r70!

Original comment by lucasreddinger on 29 Nov 2008 at 2:25