[chirp_users] European characters in Windows user name
Chirp crashes/aborts when the Windows user name contains European/Cyrillic characters.
The last line of the debug.log file reads: "UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 9: invalid start byte"
Is there a workaround? Like a command like option to set the file location to a location without "strange characters"?
Changing the user name to something else isn't really an option since it used for other systems...
Björn Ekelund SM7IUN
On Sun, Jul 24, 2016 at 1:24 AM, Björn Ekelund bjorn@ekelund.nu wrote:
Chirp crashes/aborts when the Windows user name contains European/Cyrillic characters.
The last line of the debug.log file reads: "UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 9: invalid start byte"
Is there a workaround? Like a command like option to set the file location to a location without "strange characters"?
Changing the user name to something else isn't really an option since it used for other systems...
Björn Ekelund SM7IUN
Hi Björn,
Two workarounds I can think of would be to create another user without European/Cyrillic characters just for CHIRP programming and using CHIRP Live CD.
Jim KC9HI
Thanks. Just as fldigi then. It seems to be the same with all programs ported from Linux. A command line option could solve it so easily.
Björn
24 juli 2016 kl. 13:11 skrev Jim Unroe rock.unroe@gmail.com:
On Sun, Jul 24, 2016 at 1:24 AM, Björn Ekelund bjorn@ekelund.nu wrote: Chirp crashes/aborts when the Windows user name contains European/Cyrillic characters.
The last line of the debug.log file reads: "UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 9: invalid start byte"
Is there a workaround? Like a command like option to set the file location to a location without "strange characters"?
Changing the user name to something else isn't really an option since it used for other systems...
Björn Ekelund SM7IUN
Hi Björn,
Two workarounds I can think of would be to create another user without European/Cyrillic characters just for CHIRP programming and using CHIRP Live CD.
Jim KC9HI _______________________________________________ chirp_users mailing list chirp_users@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_users This message was sent to Bjorn Ekelund at bjorn@ekelund.nu To unsubscribe, send an email to chirp_users-unsubscribe@intrepid.danplanet.com
A command line option could solve it so easily.
Patches are welcome.
The problem is, of course, not one of knowing whether we're on windows and doing something different, but the actual "something different" itself. Few of the chirp developers use windows and/or have non-ascii characters in their usernames.
It takes someone interested in and capable of solving the problem. If that's you, please see this page:
http://chirp.danplanet.com/projects/chirp/wiki/Developers
--Dan
Thanks Dan. I'll look into it. I realize I'm kind of alone in being European on Windows :-)
Björn
2016-07-24 19:19 GMT+02:00 Dan Smith dsmith@danplanet.com:
A command line option could solve it so easily.
Patches are welcome.
The problem is, of course, not one of knowing whether we're on windows and doing something different, but the actual "something different" itself. Few of the chirp developers use windows and/or have non-ascii characters in their usernames.
It takes someone interested in and capable of solving the problem. If that's you, please see this page:
http://chirp.danplanet.com/projects/chirp/wiki/Developers
--Dan _______________________________________________ chirp_users mailing list chirp_users@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_users This message was sent to Bjorn Ekelund at bjorn@ekelund.nu To unsubscribe, send an email to chirp_users-unsubscribe@intrepid.danplanet.com
On Sun, Jul 24, 2016 at 10:19 AM, Dan Smith dsmith@danplanet.com wrote:
A command line option could solve it so easily.
Patches are welcome.
The problem is, of course, not one of knowing whether we're on windows and doing something different, but the actual "something different" itself. Few of the chirp developers use windows and/or have non-ascii characters in their usernames.
It takes someone interested in and capable of solving the problem. If that's you, please see this page:
We had a similar problem when we received special characters in RepeaterBook data. I fixed that by converting the string encoding. Maybe something similar could be done with the home folder path string.
http://chirp.danplanet.com/projects/chirp/repository/revisions/07d6115431a4/...
Tom KD7LXL
Hadn't thought of that; that's a wonderful idea. We live in a worldwide Unicode world now. Some of my radios can be programmed in Japanese, others in European languages. MS started to enable Windows and apps for Unicode over 15 years ago. No reason to not go along now. Thx.
Shon K6QT
Shon R. Edwards, MA, AG (Czech Republic) Amateur call: K6QT 1039 N 2575 W Layton, UT, 84041-7709 USA Home phone: (801) 444-3445 E-mail: sre.1966@gmail.com
or
Shon Edwards 715 Strawberry Creek Private Rd. Bedford, WY 83112 Cell: (307) 248-2104
On Sun, Jul 24, 2016 at 2:57 PM, Tom Hayward tom@tomh.us wrote:
On Sun, Jul 24, 2016 at 10:19 AM, Dan Smith dsmith@danplanet.com wrote:
A command line option could solve it so easily.
Patches are welcome.
The problem is, of course, not one of knowing whether we're on windows and doing something different, but the actual "something different" itself. Few of the chirp developers use windows and/or have non-ascii characters in their usernames.
It takes someone interested in and capable of solving the problem. If that's you, please see this page:
We had a similar problem when we received special characters in RepeaterBook data. I fixed that by converting the string encoding. Maybe something similar could be done with the home folder path string.
http://chirp.danplanet.com/projects/chirp/repository/revisions/07d6115431a4/...
Tom KD7LXL _______________________________________________ chirp_users mailing list chirp_users@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_users This message was sent to Shon, K6QT at sre.1966@gmail.com To unsubscribe, send an email to chirp_users-unsubscribe@intrepid.danplanet.com
On Sun, Jul 24, 2016 at 3:05 PM, Shon Edwards sre.1966@gmail.com wrote:
Hadn't thought of that; that's a wonderful idea. We live in a worldwide Unicode world now. Some of my radios can be programmed in Japanese, others in European languages. MS started to enable Windows and apps for Unicode over 15 years ago. No reason to not go along now. Thx.
The thing is, Chirp is all unicode and always has been. The trouble is when interfacing with external things. The example fix was for RepeaterBook, where they are sending ISO-8859-1 encoded strings. We convert those to unicode for use in Chirp. Likewise, if a radio is storing a Japanese or European character in an encoding other than unicode, we need to convert it to unicode when read by Chirp. My hunch is that the problem with Windows is the same--the encoding of the home folder path is not unicode, so we must convert it. However, being a Linux dev I'm not familiar with what encoding Windows uses or what conversion is needed.
Tom KD7LXL
According to this: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).a... NTFS stores file names internally in Unicode, but there are several versions of the API calls to get short/long/Unicode names. So, since CHIRP uses Unicode internally, it is likely not a matter of converting the path to Unicode but making sure that all of the API calls catch it that way in the first place (which should never hurt folks with only ASCII characters in their paths).
This page ( http://stackoverflow.com/questions/10180765/open-file-with-a-unicode-filenam... ) has details on handling this in Python. If you explicitly pass a Unicode strong *in* you will always get Unicode back from the call. Example with os.listdir() at bottom.
On Jul 24, 2016 5:05 PM, "Shon Edwards" sre.1966@gmail.com wrote:
Hadn't thought of that; that's a wonderful idea. We live in a worldwide Unicode world now. Some of my radios can be programmed in Japanese, others in European languages. MS started to enable Windows and apps for Unicode over 15 years ago. No reason to not go along now. Thx.
Shon K6QT
Shon R. Edwards, MA, AG (Czech Republic) Amateur call: K6QT 1039 N 2575 W Layton, UT, 84041-7709 USA Home phone: (801) 444-3445 E-mail: sre.1966@gmail.com
or
Shon Edwards 715 Strawberry Creek Private Rd. Bedford, WY 83112 Cell: (307) 248-2104
On Sun, Jul 24, 2016 at 2:57 PM, Tom Hayward tom@tomh.us wrote:
On Sun, Jul 24, 2016 at 10:19 AM, Dan Smith dsmith@danplanet.com wrote:
A command line option could solve it so easily.
Patches are welcome.
The problem is, of course, not one of knowing whether we're on windows and doing something different, but the actual "something different" itself. Few of the chirp developers use windows and/or have non-ascii characters in their usernames.
It takes someone interested in and capable of solving the problem. If that's you, please see this page:
We had a similar problem when we received special characters in RepeaterBook data. I fixed that by converting the string encoding. Maybe something similar could be done with the home folder path string.
http://chirp.danplanet.com/projects/chirp/repository/revisions/07d6115431a4/...
Tom KD7LXL _______________________________________________ chirp_users mailing list chirp_users@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_users This message was sent to Shon, K6QT at sre.1966@gmail.com To unsubscribe, send an email to chirp_users-unsubscribe@intrepid.danplanet.com
chirp_users mailing list chirp_users@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_users This message was sent to Eric Vought at evought@pobox.com To unsubscribe, send an email to chirp_users-unsubscribe@intrepid.danplanet.com
^strong^string . Sorry for the Swypo.
On Jul 25, 2016 1:55 AM, "Eric Vought" evought@pobox.com wrote:
According to this: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).a... NTFS stores file names internally in Unicode, but there are several versions of the API calls to get short/long/Unicode names. So, since CHIRP uses Unicode internally, it is likely not a matter of converting the path to Unicode but making sure that all of the API calls catch it that way in the first place (which should never hurt folks with only ASCII characters in their paths).
This page ( http://stackoverflow.com/questions/10180765/open-file-with-a-unicode-filenam... ) has details on handling this in Python. If you explicitly pass a Unicode strong *in* you will always get Unicode back from the call. Example with os.listdir() at bottom.
On Jul 24, 2016 5:05 PM, "Shon Edwards" sre.1966@gmail.com wrote:
Hadn't thought of that; that's a wonderful idea. We live in a worldwide Unicode world now. Some of my radios can be programmed in Japanese, others in European languages. MS started to enable Windows and apps for Unicode over 15 years ago. No reason to not go along now. Thx.
Shon K6QT
Shon R. Edwards, MA, AG (Czech Republic) Amateur call: K6QT 1039 N 2575 W Layton, UT, 84041-7709 USA Home phone: (801) 444-3445 E-mail: sre.1966@gmail.com
or
Shon Edwards 715 Strawberry Creek Private Rd. Bedford, WY 83112 Cell: (307) 248-2104
On Sun, Jul 24, 2016 at 2:57 PM, Tom Hayward tom@tomh.us wrote:
On Sun, Jul 24, 2016 at 10:19 AM, Dan Smith dsmith@danplanet.com wrote:
A command line option could solve it so easily.
Patches are welcome.
The problem is, of course, not one of knowing whether we're on windows and doing something different, but the actual "something different" itself. Few of the chirp developers use windows and/or have non-ascii characters in their usernames.
It takes someone interested in and capable of solving the problem. If that's you, please see this page:
We had a similar problem when we received special characters in RepeaterBook data. I fixed that by converting the string encoding. Maybe something similar could be done with the home folder path string.
http://chirp.danplanet.com/projects/chirp/repository/revisions/07d6115431a4/...
Tom KD7LXL _______________________________________________ chirp_users mailing list chirp_users@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_users This message was sent to Shon, K6QT at sre.1966@gmail.com To unsubscribe, send an email to chirp_users-unsubscribe@intrepid.danplanet.com
chirp_users mailing list chirp_users@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_users This message was sent to Eric Vought at evought@pobox.com To unsubscribe, send an email to chirp_users-unsubscribe@intrepid.danplanet.com
On Sun, Jul 24, 2016 at 11:55 PM, Eric Vought evought@pobox.com wrote:
According to this: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).a... NTFS stores file names internally in Unicode, but there are several versions of the API calls to get short/long/Unicode names. So, since CHIRP uses Unicode internally, it is likely not a matter of converting the path to Unicode but making sure that all of the API calls catch it that way in the first place (which should never hurt folks with only ASCII characters in their paths).
This page ( http://stackoverflow.com/questions/10180765/open-file-with-a-unicode-filenam... ) has details on handling this in Python. If you explicitly pass a Unicode strong *in* you will always get Unicode back from the call. Example with os.listdir() at bottom.
[I apologize to all the users here that don't care about dev stuff. We're clearly in http://intrepid.danplanet.com/mailman/listinfo/chirp_devel territory now.]
In this case, we're not feeding in a variable, just reading one with os.getenv(). http://chirp.danplanet.com/projects/chirp/repository/entry/chirp/platform.py...
It looks like this post addresses our specific problem: https://measureofchaos.wordpress.com/2011/03/04/python-on-windows-unicode-en...
Tom KD7LXL
participants (6)
-
Björn Ekelund
-
Dan Smith
-
Eric Vought
-
Jim Unroe
-
Shon Edwards
-
Tom Hayward