Windows Develop Bookmark and Share   
 index > Windows Forms General > German characters messed up
 

German characters messed up

I'm creating a German vocabulary trainer app, and when I import my word list from a text file, all the special German characters get turned into squares. So "unumstößlich" becomes "unumst��lich" (well, that's the result of cut and paste from the two sources anyway). I'm using SQL Server CE , storing the data in an nvarchar type field. I don't know if I should be asking in that forum, because I don't know where the character info gets lost. I use a Streamreader to read the text file, and I've tried a Unicode encoding, as well as the default encoding and the other option to automatically detect the encoding, but it doesn't help. Should I be asking in this over in the SQL CE forum or does someone have a tip? Thanks!

class Religion { Explain (event) { try { ToExplain(event)} catch { throw("God moves in mysterious ways") } } }
pedroponting  Tuesday, October 06, 2009 7:42 AM

Guten Tag!

Could you let me know what encoding are you using for the text file? And listing the code that you used to read from the text file will be helpful for troubleshooting.

Based on your description "when I import my word list from a text file, all the special German characters get turned into squares", I suspect the encoding used in the text file and the encoding used to read it in your code don't match.

Looking forward to more info.

Thanks!
Jie
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg[at]microsoft.com


Please remember to mark the replies as answers if they help and unmark them if they provide no help.

If you have any feedback, please tell us.

The CodeFx Project
My Blog (in Simplified Chinese)
  • Marked As Answer bypedroponting Tuesday, October 06, 2009 11:29 PM
  •  
Wang, Jie  Tuesday, October 06, 2009 10:04 AM

Guten Tag!

Could you let me know what encoding are you using for the text file? And listing the code that you used to read from the text file will be helpful for troubleshooting.

Based on your description "when I import my word list from a text file, all the special German characters get turned into squares", I suspect the encoding used in the text file and the encoding used to read it in your code don't match.

Looking forward to more info.

Thanks!
Jie
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg[at]microsoft.com


Please remember to mark the replies as answers if they help and unmark them if they provide no help.

If you have any feedback, please tell us.

The CodeFx Project
My Blog (in Simplified Chinese)
  • Marked As Answer bypedroponting Tuesday, October 06, 2009 11:29 PM
  •  
Wang, Jie  Tuesday, October 06, 2009 10:04 AM
OK go figure - it's working now! I'm not sure what I changed - but I guess it was the encoding somehow...
Vielen Dank!

class Religion { Explain (event) { try { ToExplain(event)} catch { throw("God moves in mysterious ways") } } }
pedroponting  Tuesday, October 06, 2009 11:29 PM

You can use google to search for other answers

Custom Search

More Threads

• Stop or disable or capture and cancel MAXIMIZE
• Advice needed: Dynamic controls for properties when clicking on a user control
• ToolTip Control Related problem
• Getting Extended System Colours
• ToolStripTextBox and Painting
• Windows Forms Consistent Look and Feel
• My Column in window "Edit Columns" of my DataGridView
• Weird flashing treeview tooltip
• Several size icons
• Forms Location