on 2010 Mar 31 9:59 PM
Is there any way to convert some column from iso to utf8?
Something like... SELECT Id, UTF8(Name FROM table;
I need because JSON issue, i need to convert it in PHP using utf8 funcions... I'd like to receive the data already converted.
Request clarification before answering.
Also consider casting the column to NCHAR using TO_NCHAR( col ) or CAST( col as NCHAR ). You can also then manipulate the string as UTF8 within the database server itself as needed. I'm expecting (though I haven't tried it) that JSON will do "the right thing" with NCHAR values.
-john.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vincent has pointed you in the right direction in his comment to your question.
If you want to convert your data from database character to UTF8 then using
set @utf8_data = csconvert( @your_db_char_data, 'utf8' );
will convert @your_db_char_data from the database character set to UTF8.
For more information on the csconvert function see http://dcx.sybase.com/index.html#1101en/dbreference_en11/csconvert-alphabetical-functions.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Soooo... if you like a comment, vote it up: hover over the comment and you will see a teeny clickable arror.
User | Count |
---|---|
59 | |
7 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.