Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Problem with accents, charset, db mssql

  1. #1
    comas17 is offline Member
    Join Date
    May 2006
    Posts
    9

    Default Problem with accents, charset, db mssql

    Some days ago I have migrated my sugarcrm 5.2.0 from MySQL DB to MS SQL Server 2005.
    I created the new database and migrated (with MS Integration Services) all the data from MySQL tables to MSSQl 2005 tables
    Everything is working fine except for the accents (in italian we have a lot: à,è,é,ò,ì ... :-)
    In my db tables data are correct; for example "caffè" (coffee) but in my sugar pages it appears as "caff" and a little square

    If I insert a new data from sugar pages, for example "città" (town) it is displayed correctly but in my db table i find ""cittÃ"

    I want to access to db tables also with other tools (ex. Reporting Services) so I need correct data

    I found lots of forums and threads with "utf8" settings, "config.php" settings, "php.ini" settings but none seems to work

    Does anybody can help me ?

    SugarCRM 5.2.0 Community Edition
    Windows 2003 Web Edition
    SQL Server 2005 Standard Edition
    PHP 5.2.5

    Thank you

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Problem with accents, charset, db mssql

    It is because the MySQL as SugarCRM works on UTF-8 but MS SQL not, only ISO-8859-1.
    You need to convert all data into MS SQL from UTF-8 to ISO-8859-1.

    Kind regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    comas17 is offline Member
    Join Date
    May 2006
    Posts
    9

    Default Re: Problem with accents, charset, db mssql

    Thank you andopes for your quick response
    Can you explain me better ?
    Do I need to convert all the data already stored in my MSSQL tables ? how ?
    Or do I need to modify only some config file ?
    I have already tried to change my config.php file to put 'default_charset' => 'ISO-8559-1' instead of 'default_charset' =>'UTF-8' but with no success



    Thank you

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Problem with accents, charset, db mssql

    Hi comas17

    One solution is to convert the data into database.
    You should need to export the database to a sql query and run some charset converter application.
    Another solution, we used to solve another issue in a customer is to hack a single file into SugarCRM which make the system deal properly with data saved into ISO-8859-1 charset.

    I have no the code right here.
    Just send me an email remembering me and I´ll send you the file asap.

    Kind regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  5. #5
    comas17 is offline Member
    Join Date
    May 2006
    Posts
    9

    Default Re: Problem with accents, charset, db mssql

    On another website I found informations about MSSQL, PHP, UTF8, UCS2... problems

    (http://docs.moodle.org/en/Developmen...TF-8_and_UCS-2)

    They suggest to use FreeTDS or ODBTP

    Does SugarCRM support this possibility ? Does anybody have already tried it ?

    Thank you

  6. #6
    comas17 is offline Member
    Join Date
    May 2006
    Posts
    9

    Default Re: Problem with accents, charset, db mssql

    Anybody ?
    Please...

    Thank you

  7. #7
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Problem with accents, charset, db mssql

    Hi comas17

    FreeTDS only makes sense if you are using SugarCRM on Linux and a SQL Server database.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  8. #8
    comas17 is offline Member
    Join Date
    May 2006
    Posts
    9

    Default Re: Problem with accents, charset, db mssql

    Quote Originally Posted by andopes View Post
    Hi comas17

    FreeTDS only makes sense if you are using SugarCRM on Linux and a SQL Server database.

    Cheers
    Ah, OK thank you
    And what about ODBTP ? (I've seen that ODBTP is only for NT4.0, Win 2000 or XP and my server is Win 2003 ... )

    (Can you please send me the file you mentioned in your previous message ? I sent an email to your company on 8/1/2009...)

    Thank you again

  9. #9
    marketadvantage is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Orlando, FL
    Posts
    140

    Default Re: Problem with accents, charset, db mssql

    I am experiencing the exact same issue. I looked into using ODBTP, but we use win2003 and was unable to make it work. Any new thoughts on this? Thanks for the help!
    Keith Heald
    Market Advantage - Harte Hanks
    Sugar Pro 6.2
    Windows 2003
    MS SQL2008

  10. #10
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Problem with accents, charset, db mssql

    Edit this file and copy the piece of code between "Lampada hack" into the original one into include/database/MssqlManager.php
    This hack will convert SugarCRM data from UTF-8 to ISO-8859-1 and MS SQL Server data from ISO-8859-1 to UTF-8.
    It does not convert the UTF-8 data already saved into your database, so you need some tool to translate the data stored into database.


    Cheers
    Attached Files Attached Files
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem with accents, bug?
    By chackos in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2007-08-15, 03:26 AM
  2. Accents in Translation
    By rodrigoasth in forum Translators
    Replies: 0
    Last Post: 2006-10-11, 04:50 PM
  3. No accents in email's body
    By bandesz in forum Help
    Replies: 2
    Last Post: 2006-08-04, 05:15 PM
  4. Select "Account Name" charset problem
    By train in forum Help
    Replies: 0
    Last Post: 2006-04-12, 09:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •