Open GoogleCodeExporter opened 9 years ago
Unicode is definitely a problem. While it should be supported, it will create
a lot of headaches. Since there are so many encodings, the burden will have to
be passed to the user as an encoding option, but reading utf-8 or other
encodings is certainly possible. Unless I'm wrong about how Nastran in France
is used, it shouldn't affect the code beyond the comments (e.g. PBARL still
uses ASCII strings for shape names).
The io module has an open method that is used in Python 3. I've created two
sample problems with a simple test script to familiarize myself with unicode.
While it works just fine on a list of Spanish characters, it has a lot of
trouble with Greek letters. When a given encoding fails, it tries all of the
encodings. What's strange is none of these encodings decode the characters
properly. I'm sure some Greek letters work, but the ones I grabbed from
Wikipedia did not. However, they looked fine in Notepad++ as UTF-8 and it's
possible that another representation of the letter would be fine. (e.g. there
are multiple unicode glyphs that look like A).
If you can figure out what's wrong with the printing of the Greek letters, that
would help a lot. Otherwise, the strangely buggy approach that doesn't support
Greek letters will be used. Also, do you have a sample BDF and a sample script?
Original comment by mesheb82
on 29 Oct 2014 at 6:14
Attachments:
I'll check out the tests you put together. Thanks!
Original comment by jeffrey....@gmail.com
on 4 Nov 2014 at 2:57
moved to github
Original comment by mesheb82
on 14 Mar 2015 at 8:13
Original comment by mesheb82
on 8 Apr 2015 at 6:34
Original issue reported on code.google.com by
jeffrey....@gmail.com
on 29 Oct 2014 at 1:02