Your Digital Media Has Never Looked So Good

 
rcelestino
Topic Author
Posts: 10
Joined: Fri May 28, 2010 10:35 am

Charset Problem

Fri May 28, 2010 10:52 am

Hi,
I am from Argentina, and i am currently testing how integrate some services of our video on demand site to Roku.

The problem i have is with the latin characters for example tildes áéíóú,çã, etc.

I am getting the string from a UTF-8 response of REST Api or from a local file (file://lang.xml) that is encoded in UTF-8.

For example when i am creating a content list and when some content have as short description some of this characters, this work correctly in a roPosterScreen.
But when the same string i send as parameter to a roParagraphScreen AddHeaderText() this doesnt work.
And if i write the string fixed on BRS script this work correctly.

Then:
'''XML Example: pkg:/xml/lang.xml
<?xml version='1.0' encoding='utf-8' ?>
<translate>
<regiones_header><![CDATA[Configuración / Setup / Configuração]]></regiones_header>
</translate>
''''BRS Example
http=CreateObject("roUrlTransfer")
xmle=CreateObject("roXMLElement")
http.SetUrl("file://pkg:/xml/lang.xml")
xmle.Parse(http.GetToString())
utf8stringfromapiorfile=xmle.regiones_header.GetText()
screen=CreateObject("roParagraphScreen")
screen.AddHeaderText("hello from árgéntína") 'Work correctly
screen.AddHeaderText(utf8stringfromapiorfile) 'doesnt work
contentList=CreateObject("roXMLList")
contentInfo=CreateObject("roAssociativeArray")
contentInfo.ShortDescriptionLine1=utf8stringfromapiorfile
contentList.AddTail(contentInfo)
screen=CreateObject("roPosterScreen")
screen.SetContentList(contentList) 'work correctly


Can you help me?
 
rrobinson
Posts: 12
Joined: Sun May 23, 2010 7:55 pm

Re: Charset Problem

Fri May 28, 2010 11:53 am

Who is online

Users browsing this forum: No registered users and 3 guests