Show UTF8 data
Posted by Josep M on January 14, 2010 at 2:13pm
Hi,
I don't found the way of show correctly the data retrieved from one UTF8 encoded database.
Any idea?
Salut,
Josep
=====
Reply by Jan Schenkel on January 14, 2010 at 8:00pm
Hi Josep,
You'll have to use the 'UnicodeText' format for your data field, and convert the UTF-8 data to rev's UTF-16 coding.
So your data field expression would look something like:
uniEncode(theUtf8Data, "UTF8")
HTH,
Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com
=====
Reply by Josep M on January 14, 2010 at 8:34pm
But the data is stored as UTF8..
=====
Reply by Josep M on January 14, 2010 at 11:26pm
I get the correct values with:
unidecode(uniencode(FIELD_NAME_FROM_DATABASE,"UTF8"))
I don't know if exist other way but seems that this work.
Salut,
Josep
=====
Reply by Jan Schenkel on January 15, 2010 at 7:48am
Hi Josep,
Glad to hear you found a solution, but I'm not sure it will work with non-Latin characters in your UTF8 content. See also: http://www.runrev.com/developers/lesson ... torials/un...
As I stated above, there are two things to do:
- change the data field 'Format the result as' property to 'UnicodeText' using the Inspector
- change the data field expression so it returns the string in UTF-16 encoding
> Example: uniEncode(theUtf8Data, "UTF8")
HTH,
Jan Schenkel
--
Quartam Reports & PDF Library for Revolution
www.quartam.com
Show UTF8 data
-
- Posts:87
- Joined:Sun Jul 18, 2010 5:23 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
===== The above post was imported from the old forum hosted at quartam.ning.com =====