Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rcelestino
Visitor

Charset Problem

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?
0 Kudos
1 REPLY 1
rrobinson
Visitor

Re: Charset Problem

Here is what I ended up doing...
http://forums.roku.com/viewtopic.php?f=34&t=28334
0 Kudos