frère 2) select convert(_latin1 "frère" using utf8) --> frères My problem is that I couldn't get it backward by doing : select convert(_utf8 "frère" using latin1) because it still ends up with the same result: frères Can someone help me with this, and maybe give me the command to change the whole "title" column. Thank you very much for any help François [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <1177700673.717329.189220@t39g2000prd.googlegroups.com> [ref] => [htmlstate] => on_nl2br [postusername] => f-x.p@laposte.net [ip] => f-x.p@laposte.n [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> frère > 2) select convert(_latin1 "frère" using utf8) > --> frères > > My problem is that I couldn't get it backward by doing : > > select convert(_utf8 "frère" using latin1) > > because it still ends up with the same result: frères > > Can someone help me with this, and maybe give me the command to change > the whole "title" column. > > Thank you very much for any help > > François >[/ref] can you with certainty say what happened? also let us know your current encoding on the table and current collation on its columns? also let us know what you want it converted to. [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => <1177700673.717329.189220@t39g2000prd.googlegroups.com> [htmlstate] => on_nl2br [postusername] => lark [ip] => hamzee@sbcgloba [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> frère what will reverse this? Thanks a lot for any hint. Franois [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <1177775299.993563.87270@q75g2000hsh.googlegroups.com> [ref] => <1177700673.717329.189220@t39g2000prd.googlegroups.com> [htmlstate] => on_nl2br [postusername] => f-x.p@laposte.net [ip] => f-x.p@laposte.n [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> frère > what will reverse this? > > Thanks a lot for any hint. > > Franois >[/ref] hello francois, i don't think you can reverse this. i think you can try to convert it to some other character set and collation combination! lark [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <9QaZh.4285$uJ6.4038@newssvr17.news.prodigy.net> [ref] => <1177700673.717329.189220@t39g2000prd.googlegroups.com> <1177775299.993563.87270@q75g2000hsh.googlegroups.com> [htmlstate] => on_nl2br [postusername] => lark [ip] => hamzee@sbcgloba [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> frère > 2) select convert(_latin1 "frère" using utf8) > --> frères[/ref] It could also be that you sent utf-8 data on a latin-1 connection. To be sure what encoding is used, send the following command: SHOW VARIABLES LIKE '%char%'; If it is a combination of a web site and MySQL that put the data there, the encoding of the site may be utf-8, causing browsers to send utf-8 data. [ref] > My problem is that I couldn't get it backward by doing : > > select convert(_utf8 "frère" using latin1)[/ref] This is a tough one. what you see is no longer what you get. It all depends of the encoding used. In what encoding is your string sent to the server? And how do you send it (using which program)? Best regards, -- Willem Bogaerts Application smith Kratz B.V. http://www.kratz.nl/ [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <4636e922$0$321$e4fe514c@news.xs4all.nl> [ref] => <1177700673.717329.189220@t39g2000prd.googlegroups.com> [htmlstate] => on_nl2br [postusername] => Willem [ip] => w.bogaerts@krat [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> reverse mutliple cht convert - MySQL

reverse mutliple cht convert - MySQL

Hi, One of my table got messed up on the "title" column. For example the french word "frère" is now written as "frère". I guess what happened was: 1) select convert(_latin1 "frère" using utf8) --> frère 2) select convert(_latin1 "frère" using utf8) --> frères My problem is that I couldn't get it backward by doing : select convert(_utf8 "frère" using latin1) because it still ends up with the same result: frères Can someone help me with this, and maybe give me the command to change the whole "title" column. Thank you very much for any help François...

  1. #1

    Default reverse mutliple cht convert

    Hi,

    One of my table got messed up on the "title" column.

    For example the french word "frère" is now written as "frère".

    I guess what happened was:

    1) select convert(_latin1 "frère" using utf8)
    --> frère
    2) select convert(_latin1 "frère" using utf8)
    --> frères

    My problem is that I couldn't get it backward by doing :

    select convert(_utf8 "frère" using latin1)

    because it still ends up with the same result: frères

    Can someone help me with this, and maybe give me the command to change
    the whole "title" column.

    Thank you very much for any help

    François

    f-x.p@laposte.net Guest

  2. #2

    Default Re: reverse mutliple cht convert

    net wrote: 

    can you with certainty say what happened? also let us know your current
    encoding on the table and current collation on its columns? also let us
    know what you want it converted to.

    lark Guest

  3. #3

    Default Re: reverse mutliple cht convert

    Hi ,

    to give you a straight forward answer,
    cht and collation are latin1 and latin1_bin
    I have tried all the changes on my column but not change was visible

    My question is thus:
    if **select convert(_latin1 "frre" using utf8)** --> frère
    what will reverse this?

    Thanks a lot for any hint.

    Franois

    f-x.p@laposte.net Guest

  4. #4

    Default Re: reverse mutliple cht convert

    net wrote: 
    hello francois,
    i don't think you can reverse this. i think you can try to convert it to
    some other character set and collation combination!

    lark
    lark Guest

  5. #5

    Default Re: reverse mutliple cht convert

    > One of my table got messed up on the "title" column. 

    It could also be that you sent utf-8 data on a latin-1 connection. To be
    sure what encoding is used, send the following command:
    SHOW VARIABLES LIKE '%char%';

    If it is a combination of a web site and MySQL that put the data there,
    the encoding of the site may be utf-8, causing browsers to send utf-8 data.
     

    This is a tough one. what you see is no longer what you get. It all
    depends of the encoding used. In what encoding is your string sent to
    the server? And how do you send it (using which program)?

    Best regards,
    --
    Willem Bogaerts

    Application smith
    Kratz B.V.
    http://www.kratz.nl/
    Willem Guest

  6. #6

    Default Re: reverse mutliple cht convert

    On May 1, 9:15 am, Willem Bogaerts
    <maardanzonderditstuk.nl> wrote:
     


    Actually I use either a firefox webbrowser and a phpmyadmin, usually
    in utf8.
    But I also try a few things directly on the server (apache2) through a
    dos command line on XPsp2.

    There must be a way of getting this right again :-(

    The problem is not the new entries, because everything is ok for the
    newly created entries. The problem is that I have got a whole column
    with corrupted datas on every accented letter (and believe me, in
    french, there are many accents).


    Franois


    f-x.p@laposte.net Guest

  7. #7

    Default Re: reverse mutliple cht convert

    Hi,

    I found a very simple solution which I immediately published on my
    site:
    http://www.fxparlant.net/Mysql_Cht

    I have noticed that the result of the double conversion ends with the
    two characters 'ƒÂ' being added in every accented code:

    é -> é
    è -> è
    ê -> ê
    î -> î

    At least, this works for french characters, I'm not sure it is the
    same for german characters (Ö or ß), nor for asian characters

    Therefore, I simply made an update query on the columns where the
    problem happens. I simply erase the 'ƒÂ' characters.

    UPDATE page SET `page_title` = REPLACE(page_title,'ƒÂ','');
    UPDATE pagelinks SET `pl_title` = REPLACE(pl_title,'ƒÂ','');

    It worked fine for me, but of course suche queries should be tested
    first on a bigger scale.

    Thank you for your help, and hope this helps.

    François

    f-x.p@laposte.net Guest

  8. #8

    Default Re: reverse mutliple cht convert

    net schrieb: 

    If it solves your problem: great!

    It won't work in general, though.
     

    In German, we'd probably have something like

    UPDATE page SET `page_title` = REPLACE(page_title,'ÃÂ','Ö');

    This kind of mapping will always work (with the "right" character sets
    in place), because UTF8-to-anything-else is never ambiguous (at least
    not for the character sets that are covered by UTF).

    Regards,
    Jo
    Joachim Guest

  9. #9

    Default Re: reverse mutliple cht convert

    Hi,

    Sorry Jaochim, you are right in the fact that an easy update won't
    work for german, but I think you missed the point of making a
    **double** conversion.

    What the table below shows is that there is an easy rule for small
    letter with an ¨ (umlaut), but no rule for capital letters nor for ß.


    Capitals:
    A A A
    E E E
    I I I
    O O O
    U U U

    small:
    a a a
    e e e
    i i i
    o o o
    u u u

    Capital¨:
    Ä Ã„ Ä
    Ë Ã‹ Ë
    Ï Ã Ï
    Ö Ã– Ö
    Ü Ãœ Ãœ

    small¨:
    ä ä ä
    ë ë ë
    ï ï ï
    ö ö ö
    ü ü ü

    ss:
    ß ÃŸ ß

    Sincerely

    François
    f-x.p@laposte.net Guest

  10. #10

    Default Re: reverse mutliple cht convert

    net wrote: 


    Francois,

    to repair a table's character set and/or collation, there is an option
    for myisamchk that you can run on the table at the file level. it looks
    something like this:

    myisamchk --set-collation=utf8_bin


    --
    lark -- net
    To reply to me directly, delete "despam".
    lark Guest

  11. #11

    Default Re: reverse mutliple cht convert

    Hi again Lark,

    I didn't know of this command. I'll try to use it next time I update,
    because I really think my backup always gets this wrong.

    Thanks for the tip.

    Franois

    f-x.p@laposte.net Guest

Similar Threads

  1. Mutliple queries at the same time
    By csber3 in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: June 19th, 01:22 PM
  2. Mutliple sites under one/CSS Issues
    By KSA_UH in forum Macromedia Contribute General Discussion
    Replies: 9
    Last Post: June 30th, 04:40 PM
  3. Mutliple Item update not working, how?
    By Scooby Doobie Doo in forum Macromedia ColdFusion
    Replies: 2
    Last Post: March 7th, 07:07 PM
  4. Mutliple Navigation bars
    By moonglow in forum Web Design
    Replies: 3
    Last Post: October 13th, 02:09 PM
  5. mutliple websites/code
    By joe klein in forum ASP.NET Web Services
    Replies: 1
    Last Post: September 16th, 10:25 PM

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
  •