locked
Danish special characters æøåÆØÅ RRS feed

  • Question

  •  When a field in the SQL DB contains a danish special character (æøåÆØÅ) that character is returned as a small square.

    How can I get my danish special characters to show up in the text of a field ?

    Best regards
    KSor, Denmark
     

    Tuesday, September 2, 2008 1:54 PM

Answers

  •  Set your code page. Yours is 
    1142 IBM01142 IBM EBCDIC Denmark-Norway (20277 + Euro symbol); IBM EBCDIC (Denmark-Norway-Euro)
    Also.

    Also take a look.

    DOS Command CHCP displays and sets the code page.

    AlexB
    • Marked as answer by PSAKSor Wednesday, September 3, 2008 6:16 AM
    Wednesday, September 3, 2008 12:55 AM

All replies

  • If the character is returned as a small square, is that what you see in a text box? Because it could be that the data is returned properly, its just that the code is outside of what can be displayed. Otherwise the character(s) are not being saved properly. Narrow down where the problem is...either

    1. Sending of the character to the db, fails and the db receives the default character.
    2. The db received the character properly but it is not saved and is changed to the default.
    3. The db sends it out but the receiving end strips it out.
    4. It is received properly, but display does not handle the extended character.
    Which # is the issue?

    William Wegerson (www.OmegaCoder.Com)
    Tuesday, September 2, 2008 9:27 PM
  • I have already provided the solution for this problem here.  However, instead of selecting "Install files for East Asian languages", you should probably select "Install files for complex script and right-to-left languages (including Thai)"

    Bob
    • Proposed as answer by BobLeavell Thursday, September 4, 2008 11:10 AM
    Wednesday, September 3, 2008 12:41 AM
  •  Set your code page. Yours is 
    1142 IBM01142 IBM EBCDIC Denmark-Norway (20277 + Euro symbol); IBM EBCDIC (Denmark-Norway-Euro)
    Also.

    Also take a look.

    DOS Command CHCP displays and sets the code page.

    AlexB
    • Marked as answer by PSAKSor Wednesday, September 3, 2008 6:16 AM
    Wednesday, September 3, 2008 12:55 AM
  • I'll assume that your computer is already capable of displaying Danish text and that you are not working with a 25 year old IBM mainframe.  Check the data type of your table column.  ntext, nchar and nvarchar are Unicode, a good way to stay out of trouble.  text, char and varchar will impose the codepage selected for the dbase engine when it was installed unless you override it when you created the table.  Getting that wrong can produce squares.  Reading text as "image" and converting it to a string yourself can get you in trouble too if you don't use the correct System.Text.Encoding.
    Hans Passant.
    Wednesday, September 3, 2008 1:44 AM