Welcome Guest, Not a member yet? Register   Sign In
string encoding…
#1

[eluser]K.OS[/eluser]
hi there,

i have little problem with string escaing in code igniter, but i am not really sure if the problem can be found in ci at all…

i created an app using ci to read a given database, its basically just an interface to the data of an existing project, so changing the database is not an option.

this is what happens when i query the db which stores location based data like addresses:
the database outputs a string like "sample road 68" or "Görlitzer Straße 23". the first string was never a problem, but second one is, the website stores strings utf8 encoded in the database, so even if the table is set to store utf8, it will be saved as an utf8 decoded string…

so, when i query the db, i have to do an utf8_decode on "Görlitzer Straße" to get Görlitzer Stra??e… and because i have to output the data as a json string, i do an json_encode… but whenever i have this ?? character in my string, json_encode resets the stored string to null.

i have no clue, why utf8_decode works on some characters of the string, like the german umlaute but not with "sz" char(ß)…

the website that creates this data is done in symfony and symfony decodes and encodes the data correctly, but i have no idea how this is done.

what could cause a problem like this? is my database configuration wrong?

anyone, any idea how to solves this problem?

ps. i asked the symfony dev and he told me that he is not doing anything special with that data, it just outputs correctly in simfony…


Messages In This Thread
string encoding… - by El Forum - 12-10-2009, 02:18 AM
string encoding… - by El Forum - 12-10-2009, 04:50 AM
string encoding… - by El Forum - 12-10-2009, 05:41 AM
string encoding… - by El Forum - 12-10-2009, 05:59 AM
string encoding… - by El Forum - 12-10-2009, 06:51 AM
string encoding… - by El Forum - 12-10-2009, 11:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB