New topic: 

MySQL encoding question

<http://forums.realsoftware.com/viewtopic.php?t=46837>

         Page 1 of 1
   [ 10 posts ]                 Previous topic | Next topic          Author  
Message        HMARROQUINC          Post subject: MySQL encoding 
questionPosted: Wed Feb 06, 2013 8:21 am                                 
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 413
Location: Guatemala, Central America                I'm having a bit of a 
headache here. My question is: If in UTF8 encoding the letter é is c3 a9 in 
HEX which is a valid character in the UTF8 character set, if I set collation to 
UTF8  MySql should be able to store it appropriately shouldn't it? But nope... 
it stores Héctor as Héctor, which is a nice twist on my name but not the 
behavior I was expecting.

I've read that RS uses UTF8 in it's compiled strings, so using UTF8 collation 
in MySql shouldn't require a  convertencodings should it?

I'm intrigued as to why I need to convertencoding(mystring, encodings.utf8) if 
both RS and MySQL are dealing with UTF8.

I usually use ISOLatin1 and convertencode my strings, but figured if RS and 
MySQL could talk UTF8 among themselves I could save me some typing. Any ideas?  
    
_________________
Future RS guru.
Ride the world!  
                             Top                MonkeybreadSoftware          
Post subject: Re: MySQL encoding questionPosted: Wed Feb 06, 2013 9:00 am       
                          
Joined: Wed May 10, 2006 2:42 pm
Posts: 2878
Location: Germany                Well, I know that some people use our MBS SQL 
Plugin instead of the official one because they run into problems.

So you can try our plugin as an alternative.

Greetings
Christian      
_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php  
                             Top                HMARROQUINC          Post 
subject: Re: MySQL encoding questionPosted: Wed Feb 06, 2013 9:10 am            
                     
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 413
Location: Guatemala, Central America                Christian, if it 
communicates with mysql on a UTF8 to UTF8 basis and handles accented letters I 
will buy it ASAP. Could save me a lot of typing.      
_________________
Future RS guru.
Ride the world!  
                             Top                HMARROQUINC          Post 
subject: Re: MySQL encoding questionPosted: Wed Feb 06, 2013 9:30 am            
                     
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 413
Location: Guatemala, Central America                Also, Christian I believe 
your signature has the wrong year      
_________________
Future RS guru.
Ride the world!  
                             Top                MonkeybreadSoftware          
Post subject: Re: MySQL encoding questionPosted: Wed Feb 06, 2013 9:32 am       
                          
Joined: Wed May 10, 2006 2:42 pm
Posts: 2878
Location: Germany                Thanks.
I have signatures hidden in my view, so I didn't notice it.

Greetings
Christian      
_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php  
                             Top                timhare          Post subject: 
Re: MySQL encoding questionPosted: Wed Feb 06, 2013 1:59 pm                     
    
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12051
Location: Portland, OR  USA                Remember that you must define the 
encoding when you read a string back from the database.   
                             Top                HMARROQUINC          Post 
subject: Re: MySQL encoding questionPosted: Wed Feb 06, 2013 2:11 pm            
                     
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 413
Location: Guatemala, Central America                timhare wrote:Remember that 
you must define the encoding when you read a string back from the database.

yes, just checking if there was a way to type a bit less code LOL!      
_________________
Future RS guru.
Ride the world!  
                             Top                HMARROQUINC          Post 
subject: Re: MySQL encoding questionPosted: Wed Feb 06, 2013 2:35 pm            
                     
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 413
Location: Guatemala, Central America                I guess I got spoiled by 
cubesql.      
_________________
Future RS guru.
Ride the world!  
                             Top                MonkeybreadSoftware          
Post subject: Re: MySQL encoding questionPosted: Wed Feb 06, 2013 2:52 pm       
                          
Joined: Wed May 10, 2006 2:42 pm
Posts: 2878
Location: Germany                In my opinion the database class should take 
string with encoding and return strings with encoding.

Doing defineEncoding is workaround, but should not be required.

Greetings
Christian      
_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php  
                             Top                HMARROQUINC          Post 
subject: Re: MySQL encoding questionPosted: Wed Feb 06, 2013 3:01 pm            
                     
Joined: Sun Jan 25, 2009 5:11 pm
Posts: 413
Location: Guatemala, Central America                MonkeybreadSoftware 
wrote:In my opinion the database class should take string with encoding and 
return strings with encoding.

Doing defineEncoding is workaround, but should not be required.

Greetings
Christian

My feelings too.      
_________________
Future RS guru.
Ride the world!  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 10 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]

Reply via email to