Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues for on non-english OS error text #1856

Closed
totaam opened this issue May 28, 2018 · 12 comments
Closed

Issues for on non-english OS error text #1856

totaam opened this issue May 28, 2018 · 12 comments

Comments

@totaam
Copy link
Collaborator

totaam commented May 28, 2018

Issue migrated from trac ticket # 1856

component: client | priority: trivial | resolution: wontfix

2018-05-28 14:01:22: stdedos created the issue


2018-05-28 15:39:27,405 Xpra gtk2 client version 2.3-19246 64-bit
2018-05-28 15:39:27,409  running on Microsoft Windows 10
2018-05-28 15:39:28,913 Warning: failed to import opencv:
<Unicode console stdout>.write: UnicodeDecodeError('utf8', '2018-05-28 15:39:28,913  DLL load failed: ??p??a ???t??a p??et??\xb5as?a? \xb5?a? \xdf?\xdf???????? d??a\xb5???? s??des?? (DLL) ap?t??e.\n', 64, 65, 'invalid start byte')
Traceback (most recent call last):
  File "C:/msys64/mingw64/lib/python2.7/logging/__init__.py", line 891, in emit
UnicodeDecodeError: 'utf8' codec can't decode byte 0xb5 in position 64: invalid start byte
Logged from file log.py, line 132
2018-05-28 15:39:28,913  webcam forwarding is disabled

I have tried various ways to go around that, but I cannot seem to find something special.

I think at some point I manage to "decode" the text, but I cannot seem to remember the used codepage. (I will update if I manage to)

Text is in Greek (suggested codepage for chcp is 1253)

Recommended chcp for UTF-8 is 65001 (although internet says it's broken anyway)

@totaam
Copy link
Collaborator Author

totaam commented May 28, 2018

2018-05-28 14:01:27: stdedos uploaded file test-orig.log (1.0 KiB)

@totaam
Copy link
Collaborator Author

totaam commented May 28, 2018

This exception comes from opencv, not xpra itself.
I have just checked and xpra handles unicode exception messages just fine.

So I will probably close this ticket as wontfix unless someone else fixes it.
We'll have to wait for #1231 to replace opencv with something better. ie something that doesn't break with such regularity - see r17571 and many other fixes like it..

@totaam
Copy link
Collaborator Author

totaam commented May 29, 2018

2018-05-29 20:58:17: stdedos commented


I didn't manage to decode the file. Is it possible that the output is already mangled?

I'll add some 2c, but I am fine with your opinion regardless.
I have some example text in the mentioned encoding (see attached file).

It could be possible to "fix this" by adding cmd /V /C "set LANG=C && gpg -k --check-trustdb" (check on the attached file again).
Maybe this workaround is specific to gpg itself however?

@totaam
Copy link
Collaborator Author

totaam commented May 29, 2018

2018-05-29 20:58:41: stdedos uploaded file examples.log (0.4 KiB)

@totaam
Copy link
Collaborator Author

totaam commented May 29, 2018

2018-05-29 21:02:16: stdedos commented


(forgot to mention: in Notepad2 [http://www.flos-freeware.ch/notepad2.html], working encoding is OEM (737) / Greek (DOS-737)

@totaam
Copy link
Collaborator Author

totaam commented May 30, 2018

I didn't manage to decode the file. Is it possible that the output is already mangled?

Yes, it's very likely.

It could be possible to "fix this" by adding cmd /V /C "set LANG=C && gpg -k --check-trustdb"

Using LANG=C is cheating, you're using the default locale.

@totaam
Copy link
Collaborator Author

totaam commented May 30, 2018

2018-05-30 07:22:34: stdedos commented


Replying to [comment:5 Antoine Martin]:

It could be possible to "fix this" by adding cmd /V /C "set LANG=C && gpg -k --check-trustdb"
Using LANG=C is cheating, you're using the default locale.

Probably I am cheating. However, if that one-line workaround "saves" you some time until you switch from OpenCV once and for all, I am not sure if it would be too harmful.

Obviously, your call :D

@totaam
Copy link
Collaborator Author

totaam commented May 30, 2018

Please try a build r19535 or later from [https://xpra.org/beta/windows].

@totaam
Copy link
Collaborator Author

totaam commented May 31, 2018

Unfortunately, trick does not work :/
Apologies for the work.

@totaam
Copy link
Collaborator Author

totaam commented May 31, 2018

2018-05-31 15:58:00: stdedos uploaded file xpra-cv-fail.log (0.7 KiB)

@totaam
Copy link
Collaborator Author

totaam commented May 31, 2018

r19543 will set LC_ALL=C rather than LANG=C - updated builds to come later.
You can already check if that is going to work by setting it before running xpra.

If that still doesn't help, then I will close this ticket as "wontfix".

@totaam
Copy link
Collaborator Author

totaam commented May 31, 2018

2018-05-31 16:09:17: stdedos commented


Oups! ... Maybe should've thought that earlier :/

However; this doesn't work. I literally did:

set LC_ALL=C
set LANG=C
xpra attach [...]

Does not parse it.

Since you went through the trouble to push a new commit, I'll test the build when it comes. However, not too optimistic about it :/

@totaam totaam closed this as completed May 31, 2018
@totaam totaam added the v2.3.x label Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant