buggnokii - Bugs: bug #32414, missing charset initialization in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #32414: missing charset initialization in smsd mysql driver

Submitted by:  Daniel Müller <danielm>
Submitted on:  Thu 10 Feb 2011 02:04:22 PM UTC  
 
Category: smsdSeverity: 3 - Normal
Item Group: minor malfunctionStatus: Fixed
Privacy: PublicAssigned to: Jan Derfinak <ja>
Open/Closed: Closed

Thu 03 Mar 2011 01:18:27 PM UTC, comment #4:

I thank you Daniel for feedback.

I closing the bug as fixed.

jan

Jan Derfinak <ja>
Project MemberIn charge of this item.
Thu 03 Mar 2011 12:32:51 PM UTC, comment #3:

Hello Jan, I have tested your patch with mysql backend and mysql 5.5.8

Works great.

I have tested the auto detection with different locales:

Locale Resulting SMS:
-----------------------------------------
C "Test "
de_DE.ISO8859-1 "Test äöüß? test"
de_DE.ISO8859-15 "Test äöüß? test"
de_DE.UTF-8 "Test äöü߀ test"

latin9 (8859-15) is not supported by mysql, so the euro sign
works only with UTF-8.

The new option "-e" also works as expected, as long the encoding matches the locale:

Locale -e Resulting SMS
------------------------------------------------
de_DE.UTF-8 latin1 "Test "
de_DE.UTF-8 utf8 "Test äöü߀ test"
de_DE.ISO8859-1 latin1 "Test äöüß? test"
de_DE.ISO8859-1 utf8 "Test <garbage> test"

Daniel Müller <danielm>
Tue 15 Feb 2011 08:17:53 PM UTC, comment #2:

Daniel, thank for your patch. Based on your idea I prepared attached patch which introduces new option -e, --encoding, where you can specify your client encoding for mysql and postgresql backends. If you use mysql 5.5 or higher and you don't specify encoding, smsd tries to use new client encoding autodetection introduced in mysql 5.5.0.

Please, test attached patch.

Jan

(file #22695)

Jan Derfinak <ja>
Project MemberIn charge of this item.
Tue 15 Feb 2011 05:07:06 PM UTC, comment #1:

Jano, could you please verify that?

Pawel Kot <pkot>
Project Administrator
Thu 10 Feb 2011 02:04:22 PM UTC, original submission:

If I send sms messages through smsd with the mysql driver,
messages with german umlauts get truncated at the position of the special char.

I have attached a patch, which sets the character set of the mysql connection to utf8.

Tested with version 0.6.30

Daniel Müller <danielm>

 

Attached Files
file #22695:  client_encoding.diff added by ja (6KiB - text/x-patch)
file #22645:  patch-utf8-mysql added by danielm (540B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ja (Updated the item)
  • -unavailable- added by pkot (Posted a comment)
  • -unavailable- added by danielm (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 03 Mar 2011 01:18:27 PM UTCjaStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 17 Feb 2011 10:09:02 AM UTCjaStatusNone=>Ready For Test
    Tue 15 Feb 2011 08:17:53 PM UTCjaAttached File-=>Added client_encoding.diff, #22695
    Tue 15 Feb 2011 05:07:06 PM UTCpkotAssigned toNone=>ja
    Thu 10 Feb 2011 02:04:22 PM UTCdanielmAttached File-=>Added patch-utf8-mysql, #22645

    Back to the top


    Powered by Savane 3.1-cleanup1