Storing Unicode string in Sybase ,c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ravan1234
    New Member
    • Oct 2008
    • 2

    Storing Unicode string in Sybase ,c#

    Hello Guys,
    I am having some problem with Unicode string in KATAKANA format.

    I am decoding string and then storing in db (SYbase).
    Also while retrieving data I am encoding and then displaying.

    Source Encoding is jp_shift
    Target Encoding is 932.

    But the data get stores in ???? format.
    In VB the code works perfect ...
    While saving only VB is doing the following encoding ...
    temp = StrConv(Value, vbFromUnicode)
    where Value is string passed ..
    Can we migrate this code to C#.NET ?
  • SvenV
    New Member
    • Oct 2008
    • 50

    #2
    I don't understand exactly what you are trying to explain. But the strconv() is also available in c# and you need to pass the following parameters: your string, value in this case and a selection from the vbstrconv enumeration You can find some more information on msdn

    Comment

    • mldisibio
      Recognized Expert New Member
      • Sep 2008
      • 191

      #3
      When you say the data is stored as "???" make sure you are viewing the data using a font that can display the extended characters.

      I am not saying this is the only problem without seeing the conversion code.

      But verify your font first. We were storing chinese characters once and everyone thought the conversions were not working, until we started using MS Mincho to view the data. Courier New and system fonts usually don't have extended characters.

      Note that web browsers usually find the needed font, but database managers which let you write queries and view the results do not dynamically change the font to match the character set.

      Comment

      • ravan1234
        New Member
        • Oct 2008
        • 2

        #4
        Hello Guys Thank u very much for ur replys ...
        Actually ,the problem was with Language Settings on my machine.
        Thanks n Have a Good TIme.

        Comment

        Working...