[Ironpython-users] [Newbee ironpython and WinForms] Problem of encodage with a ListBox (Winforms) - accented characters
bruno gallart
bruno.gallart at orange.fr
Fri Dec 21 19:10:03 CET 2012
Hi,
I am doing a spellchecker with the Hunspell ' library for .Net -- >
Nhunspell for a language of south of Europe (WinForms).
My program runs well, it checks a Word's document, gives all the wrong
words etc... With a button I pass all the wrong words and for every
word, it gives me, in a ListBox, all the suggestions for this word.
My problem:
If the suggestion is a word without accented character I can choose it
and put it in the Word's document, it is fine ! But if this word has
accented character when I choose it in the listbox (it is seen well with
the accented character) I have an error message (in french) but it is a
problem of encoding (my translation not very good "impossible to give
an encoding from the unicode page") in french ("Impossible de traduire
les octets [E8] à l'index 0 à partir de la page de codes spécifiée en
Unicode"). It is for exemple, for the words " òme " , "òbra" etc...
I am a newbee in .NET and Winforms, I am quite lost
My questions :
My program is encoding in UTF-8,
What encoding gives the string coming from " listBox.SelectedItem " I
think Unicode ?
The NHunspell's files for check ( xx.aff and ww.dic ) are with "
alphabet occidental" ("iso-8859-15")
What can I do ? I transform the encoding of the ListBox's string ... but
how ? I don't know the command . Or there is an another thing to do ?
Thanks for your patience
Bruno
More information about the Ironpython-users
mailing list