Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Apr 29, 2017 4:29 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: String <> String?
PostPosted: Fri May 10, 2013 12:43 am 
Offline

Joined: Sat Nov 03, 2012 5:34 am
Posts: 14
Hello all,
I have tried this simple code:

Dim s As String
s=chr(&hFE)+ chr(&hFE)+ chr(&h76) + chr(&hE0)+ chr(&h03)+ chr(&hFD)


Should give a binary chain of "FE FE 76 EO 03 FD". In REAL Studio 2011 Release 4.2 is does so.

In Real Studi0 2012 Release I receive "C3 BE C3 BE 79 C3 A0 03 C3 BD".

Well, this looks like UDF-8 coding, but why???

Any ideas?

Greetings
Wolfgang


Top
 Profile  
 
 Post subject: Re: String <> String?
PostPosted: Fri May 10, 2013 1:16 am 
Offline
Site Admin
User avatar

Joined: Tue May 06, 2008 1:07 pm
Posts: 1464
Location: NotEvenOnTheMap, CT
Use Encodings.ASCII.Chr instead.

_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.


Top
 Profile  
 
 Post subject: Re: String <> String?
PostPosted: Fri May 10, 2013 2:05 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Chr() has always supposed to be UTF-8, but it made an exception for values from 128-255, where it functioned like ChrB(). They corrected that bug. Use ChrB() instead. Or Encodings.ASCII.Chr().


Top
 Profile  
 
 Post subject: Re: String <> String?
PostPosted: Fri May 10, 2013 3:33 am 
Offline

Joined: Sat Nov 03, 2012 5:34 am
Posts: 14
Thank you Thom and Tim!

thought it would have a very simple solution! So simple that is is always hard to find! ;-)

Now all works as it should!

Wolf


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group