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: 
renojim
Community Streaming Expert

Re: How can developer test with different regions?

"EnTerr" wrote:
Re setting Region, my current understanding is it gets set once-and-for-all during initial user account creation based on geo-IP at the time of creation. In other words, it does not matter what language you do player setup in - when associated with account, it will inherit account's region.

Yeah, I know. I used a VPN to "locate" myself in France. It was pretty clear the Roku website thought I was in France when my account was setup. It wasn't as clear for the account I setup from Ireland. One of the "what's my IP" sites thought I was in Canada, so I can't be sure where Roku thought I was. I should have checked what country Roku automatically filled in for my address, but I didn't think of it. Either way, GetCatalog returned a cost in GBP when I linked that account to my SE.

Doing a factory reset on my SE and linking it to my "French" account still returned the "cost" in GBP from GetCatalog. I'm guessing that it's a bug in roChannelStore that isn't seen unless the string returned from GetCatalog is actually displayed to the user. Until recently I just hard-coded the prices in USD. The actual screens from the purchase process handled by roChannelStore would, I assume, display the correct price in the correct currency that the user would be charged. I thought it would be cleaner and more professional to display the true price in the user's currency on my screens, but other than hard-coding the strings and doing an update if/when exchange rates are updated (does Roku ever update them?) I don't see a way to do it.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
EnTerr
Roku Guru

Re: How can developer test with different regions?

"renojim" wrote:
It wasn't as clear for the account I setup from Ireland. One of the "what's my IP" sites thought I was in Canada, so I can't be sure where Roku thought I was. I should have checked what country Roku automatically filled in for my address, but I didn't think of it. Either way, GetCatalog returned a cost in GBP when I linked that account to my SE.
Well, "Northern Ireland" is part of UK/GBP, so where IP was placed vs rest of the island "Republic of Ireland" (".ie" TLD)... go figure

Doing a factory reset on my SE and linking it to my "French" account still returned the "cost" in GBP from GetCatalog. I'm guessing that it's a bug in roChannelStore that isn't seen unless the string returned from GetCatalog is actually displayed to the user.
Ouch. That would be nasty thing for a Frenchman to see, "i can guarantee you that"!
Roku*, can we get a bug filed on this?

I wonder if it's related to this one viewtopic.php?f=34&t=90866&p=510916#p529491 -
where Mexico and Canada were lacking a certain... je ne sais quoi :mrgreen:
0 Kudos
Tajson
Visitor

Re: How can developer test with different regions?

"renojim" wrote:
Doing a factory reset on my SE and linking it to my "French" account...


Did you have a French IP address while you did the factory reset and linked it to your account?
0 Kudos
renojim
Community Streaming Expert

Re: How can developer test with different regions?

The Roku itself never had a French IP address. Its IP address was always a U.S. IP address. The Roku account was created via a Paris IP address and the Roku was linked to that French account. The billing should be connected to the account and not depend on where the box is located. In other words, if I take my Roku that's connected to a U.S. account to France and make an in-app purchase, I'd expect to be charged in USD. Likewise, if my French friend took his Roku that's connected to a French account across the pond, I'm sure he'd expect to still be charged in Euros. I could be wrong about all this, but that's how I'm interpreting what RokuJoel stated a few posts back.

It still appears to me that GetCatalog() returns the cost in GBP unless the account is a U.S. account, but until someone with a box located outside the U.S. and an account created outside the U.S. (and outside the UK) chimes in, we'll never know. For GetCatalog() to return one price and the purchase process to display another just has to be a bug somewhere, even if this is an abnormal case.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
renojim
Community Streaming Expert

Re: How can developer test with different regions?

I'm happy to report that it looks like GetCatalog() may now be returning the cost in the proper currency for the account! I'm assuming it was taken care of on the back end. I've only looked at my French account, but it's now returning a cost in Euros. Yay! I can finally verify that my font can handle the Euro symbol. 😄

For anyone wondering how exactly the Euro symbol appears in the cost string:
cost string is "0,79 Gé¼"  <- Windows console can't handle the symbol
Length of 'cost' string is 6
asc() values: 48 44 55 57 32 8364 <- I thought asc() gave a value <= 255?
Hex dump: 302C373920E282AC <- used roByteArray.FromAsciiString(cost) and .toHexString()

An earlier capture of a cost in GBP produced:
cost string is "-ú0.69"
Length of 'cost' string is 5
asc() values: 163 48 46 54 57
Hex dump: C2A3302E3639

I don't know if I'll bother going through all the different regions, but if anyone wants me to check one or more, let me know.

There's still an oddity with a side-loaded app and the test products. There appears to be a combination of localized number format and prices in USD. I'm seeing "cost: 1,99 $ (USD)" on my SE (note the comma) connected to a French account, but "cost: $1.99" on my Stick (thanks, EnTerr!) connected to a U.S. account.

Thanks to whomever is responsible for fixing this! I just wish some kind of acknowledgement and/or update had been made.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
EnTerr
Roku Guru

Re: How can developer test with different regions?

Glad it found a good home to stick! 8-)

"renojim" wrote:
Thanks to whomever is responsible for fixing this! I just wish some kind of acknowledgement and/or update had been made.

Ah yes. A proper thing would be to admit the issue and that it was fixed.
"They" pulled the same one on me at viewtopic.php?f=34&t=95551
I actually wouldn't mind looking like a fool reporting "issues that don't exist", if they were fixing everything that fast. I'll take such deal any day of the week.

I am rather impressed that progress in the billing system has happened as we spoke, within a week! I guess in the web services group they have some better developers (and should not be confused for the dangerous web developers which brought us the "re-imagining" of the dev.portal).

I am extra impressed that now the currency format is right - "0,79 €" - i was going to note that € sign customarily is put in front of the number, just like with USD and GBP. Aha - but not so fast! - turns out that's true for English - in French the same Euro has to be after the number. And of course everybody knows they use the "decimal comma"^

(^) did you however know Canada swings both ways? Me neither!
It's not the account Region alone - the player Language also should be taken into accountt. Oh, this is so much fun! Smiley LOL
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: How can developer test with different regions?

"renojim" wrote:

...
...
asc() values: 48 44 55 57 32 8364 <- I thought asc() gave a value <= 255?



String characters represent Unicode code points.
8364 = U+20AC 'EURO SIGN'
0 Kudos
belltown
Roku Guru

Re: How can developer test with different regions?

"renojim" wrote:
cost string is "0,79 Gé¼"  <- Windows console can't handle the symbol

You can change the Windows console font by clicking the icon in the top left-hand corner, selecting Properties, then Font, and choosing another font, e.g. Consolas or Courier New.
0 Kudos
renojim
Community Streaming Expert

Re: How can developer test with different regions?

I tried changing the font, but it didn't make a difference. I only have Consolas, Lucida Console, and Raster Fonts to choose from. I think there's more going on here than just the font. I don't think the Windows 7 console understands UTF-8.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
EnTerr
Roku Guru

Re: How can developer test with different regions?

"renojim" wrote:
I tried changing the font, but it didn't make a difference. I only have Consolas, Lucida Console, and Raster Fonts to choose from. I think there's more going on here than just the font. I don't think the Windows 7 console understands UTF-8.

Tweaking font won't do. The three chars you see are likely the euro in UTF-8 (0xE2 0x82 0xAC) - at least for £ that was the case dumped (0xC2 0xA3).

Are you using the default `telnet.exe` of Windows? Rumor has it Windows console might be switchable to UTF-8, see http://stackoverflow.com/a/388500/226086
Also, try `putty` pimped up to UTF-8?

out-of-the-box telnet, OSX:
BrightScript Debugger> ? chr(8364)

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.