![]() |
|
Encoding in AJAX - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Encoding in AJAX (/thread-222.html) Pages:
1
2
|
Encoding in AJAX - adas - 2006-01-13 I install a Zenphoto on my server. And I saw that in themes don't have a encoding declaration: And I saw that Ajax script to add a titles and description save a polish chars ( Quote:?a?ó?? ?ó?t? ja?? Quote:Za%u017Có%u0142%u0107 %u017Có%u0142t%u0105 ja%u017A%u0144 Encoding in AJAX - pronvit - 2006-01-14 i've sent patches to fix this to tristan some time ago but still no reply.. Encoding in AJAX - adas - 2006-01-19 pronvit: write it in comment. Encoding in AJAX - pronvit - 2006-01-19 add to beginning of template-functions.php /**
*/ function unescape($source, $iconv_to = 'UTF-8') { $decodedStr = ''; $pos = 0; $len = strlen ($source); while ($pos < $len) {
} if ($iconv_to != "UTF-8") {
} return $decodedStr; } /**
*/ function code2utf($num){ if($num6)+192).chr(($num&63)+128); if($num>12)+224).chr((($num>>6)&63)+128).chr(($num&63)+128); if($num>18)+240).chr((($num>>12)&63)+128).chr((($num>>6)&63)+128) .chr(($num&63)+128); return ''; } ` then change stripslashes($newtitle) to stripslashes(unescape($newtitle)) and don't forget to add meta content-type = utf-8 Encoding in AJAX - adas - 2006-01-20 Thanks. But one polish letter (ó) doesn't work now fine. Encoding in AJAX - trisweb - 2006-01-22 I'm sure there are better ways to do this. I have pronvit's mods, but I'll look into better encoding options. Thanks for the report. Encoding in AJAX - pronvit - 2006-01-22 why this way isn't good enough? Encoding in AJAX - trisweb - 2006-01-22 It might be, I just always look for the best way... is there something wrong with that? ;-) It probably is fine. You're welcome to hack ZP to use it if need be. Encoding in AJAX - pronvit - 2006-01-25 nothing wrong. Encoding in AJAX - adas - 2006-01-26 Quote:encoding problems are quite critical for non-english users Encoding in AJAX - WeiChen - 2006-01-31 Easy solution for non-english users. add Encoding in AJAX - adas - 2006-01-31 WeiChen: thanks Encoding in AJAX - adas - 2006-01-31 I think, that this line: Encoding in AJAX - spacemonkey - 2006-02-21 Shouldn't a simple htmlentities() PHP function change any special character to a valid html entity? I mean it converts all applicable characters to HTML entities. http://fi.php.net/htmlentities . I just don't know where to put this so that it would convert the text to html entities BEFORE it's saved to the database. I need Finnish/Scandinavian characters and they're coming out as just blocks or question marks. Help, please. Where could I put this? Encoding in AJAX - hdort - 2006-03-08 WeiChen: seems to work ok for German, too! Many thanks! Perhaps this change should be added in the next version? Encoding in AJAX - Guest - 2006-04-20 Oh, but this doesn't work for Russian language... shit =) Encoding in AJAX - Mania - 2006-04-21 Spacemonkey: I used WeiChen method but with a charset ISO-8859-15 to make Finnish letters work. However, if the image has Finnish letters, it won't display properly. Encoding in AJAX - adas - 2006-05-31 In latest version this bug is not resolved... Encoding in AJAX - trisweb - 2006-05-31 It is now! Version to be released today with support for any desired character-set, including UTF-8 by default. Encoding in AJAX - JohnieRoger - 2007-12-02 It still shows all scandinavian letters (ä,Ã¥,ö) as question marks in File Info and Tags. Does anyone know what to do for this? |