New topic: String <> String?
<http://forums.realsoftware.com/viewtopic.php?t=47839> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message WolfB Post subject: String <> String?Posted: Fri May 10, 2013 12:43 am 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 Thom McGrath Post subject: Re: String <> String?Posted: Fri May 10, 2013 1:16 am Site Admin Joined: Tue May 06, 2008 1:07 pm Posts: 1448 Location: NotEvenOnTheMap, CT Use Encodings.ASCII.Chr instead. _________________ Thom McGrath - @tekcor Web Framework Architect, Real Software, Inc. Top timhare Post subject: Re: String <> String?Posted: Fri May 10, 2013 2:05 am Joined: Fri Jan 06, 2006 3:21 pm Posts: 12311 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 WolfB Post subject: Re: String <> String?Posted: Fri May 10, 2013 3:33 am 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 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
