Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Convert file from ANSI to UNICODE


Convert file from ANSI to UNICODE

Author
Message
SQL_Surfer
SQL_Surfer
Old Hand
Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)

Group: General Forum Members
Points: 398 Visits: 1076
Also opened in notepad++, it says ANSI.
David McKinney
David McKinney
Right there with Babe
Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)

Group: General Forum Members
Points: 769 Visits: 2090
Does your notepad++ have a hex editor?

In Ultraedit I can see the hex value of the bytes, and I can clearly see in a unicode file that there are 2 bytes for each character. (I click on a character and 2 bytes are highlighted.)
mister.magoo
mister.magoo
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2266 Visits: 7820
cast your column as unicode

MM


select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);




  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • SQL_Surfer
    SQL_Surfer
    Old Hand
    Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)

    Group: General Forum Members
    Points: 398 Visits: 1076
    David, I downloaded ultraedit. Is unicode file always shows in hexadecimal? I did what you suggested and when I click on 1 character, two bytes are highlighted. But when I opened a non-unicode file, it doesn't open up in hexadecimal.
    SQL_Surfer
    SQL_Surfer
    Old Hand
    Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)

    Group: General Forum Members
    Points: 398 Visits: 1076
    I am using the following swtich in BCP.

    -w -T -t"|" -r"" -c -q

    Seems like one switch is overiding the other. File looks different but enocoding hasn't changed to unicode.
    mister.magoo
    mister.magoo
    SSCrazy
    SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

    Group: General Forum Members
    Points: 2266 Visits: 7820
    SQL_Surfer (4/5/2013)
    I am using the following swtich in BCP.

    -w -T -t"|" -r"" -c -q

    Seems like one switch is overiding the other. File looks different but enocoding hasn't changed to unicode.


    Yes, the "-c" switch means use ANSI, get rid of it.

    MM


    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);




  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • SQL_Surfer
    SQL_Surfer
    Old Hand
    Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)

    Group: General Forum Members
    Points: 398 Visits: 1076
    That worked. Thanks for all of your help.
    David McKinney
    David McKinney
    Right there with Babe
    Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)Right there with Babe (769 reputation)

    Group: General Forum Members
    Points: 769 Visits: 2090
    SQL_Surfer (4/5/2013)
    David, I downloaded ultraedit. Is unicode file always shows in hexadecimal? I did what you suggested and when I click on 1 character, two bytes are highlighted. But when I opened a non-unicode file, it doesn't open up in hexadecimal.


    Several days too late...but it's Ctrl-H to view a file in Hex mode in ultraedit.
    Flloriya
    Flloriya
    Grasshopper
    Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

    Group: General Forum Members
    Points: 10 Visits: 31
    SQL_Surfer (4/5/2013)
    How can we convert ANSI files to UNICODE?

    You can convert ANSI files to Unicode format manually, but sometimes this may become very difficult if the PST files are large in size. To convert an ANSI PST file into Unicode format, first create a new Outlook data file in either MS Outlook 2003, 2007 or 2010 and then copy all the emails and other mailbox items from ANSI file to this new Unicode file. This really takes excellent technical knowledge, a lot of hard work and much time (especially when the files are large). I never tried this, I just read about this in an article. You may take help from this article.
    Other than this, there is one more effective solution for this situation. You can use third-party software to convert an ANSI PST file into Unicode format. There is a software named as SysInfoTools PST Upgrade & Downgrade that can easily convert ANSI PST to Unicode format and Unicode PST to ANSI format. I recommend you to check its free demo version before buying any other third-party PST converter.
    Regards. :-)
    SQL_Surfer
    SQL_Surfer
    Old Hand
    Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)Old Hand (398 reputation)

    Group: General Forum Members
    Points: 398 Visits: 1076
    '" -T -t"|" -r"" -c -q'

    With the switch above, some files are getting generated in ANSI and some are generated in UNICODE...If I want just ANSI, what change do I have to make?
    Go


    Permissions

    You can't post new topics.
    You can't post topic replies.
    You can't post new polls.
    You can't post replies to polls.
    You can't edit your own topics.
    You can't delete your own topics.
    You can't edit other topics.
    You can't delete other topics.
    You can't edit your own posts.
    You can't edit other posts.
    You can't delete your own posts.
    You can't delete other posts.
    You can't post events.
    You can't edit your own events.
    You can't edit other events.
    You can't delete your own events.
    You can't delete other events.
    You can't send private messages.
    You can't send emails.
    You can read topics.
    You can't vote in polls.
    You can't upload attachments.
    You can download attachments.
    You can't post HTML code.
    You can't edit HTML code.
    You can't post IFCode.
    You can't post JavaScript.
    You can post emoticons.
    You can't post or upload images.

    Select a forum

































































































































































    SQLServerCentral


    Search