unicode breaks arbtt-status --dump-samples

Create issue
Issue #51 new
Former user created an issue

(I know this is a duplicate, but without an account I can only create Issues, no comments, sorry)

Anonymous created an issue 2014-09-27

If you have unicode in your window titles, --dump-samples fails

example window name which causes problems

WM_NAME(COMPOUND_TEXT) = "gwern \033%G\342\200\223\033%@ Konversation"

I have the same issue, too. It is a Windows 10 machine. The issue only appears, when running from cmd.exe. If I use "Bash on Ubuntu on Windows" the error does not appear. I am not entirely sure, if this is due to unicode (as none is seen in the output) or if there is another problem.

The command fails like this:

C:\Users\<user redacted>>arbtt-stats --dump-samples --filter="$sampleage <02:00"
2018-07-09 21:46:38 (5688ms inactive):
    ( ) \Device\HarddiskVolume6\Windows\explorer.exe: Program Manager
    ( ) \Device\HarddiskVolume6\Windows\SystemApps\Microsoft.Windows.PeopleExperienceHost_cw5n1h2txyewy\PeopleExperienceHost.exe: arbtt-stats: <stdout>: commitBuffer: invalid argument (invalid character)

Comments (5)

  1. nomeata repo owner

    In the bash environment, what is the value of the LANG environment variable? (echo $LANG)?

  2. Philipp Uhl

    Ok, had to create an account eventually, I guess...

    $ echo $LANG
    de_DE.UTF-8
    

    On bash it does work properly though. It is the cmd.exe-version that misbehaves.

  3. nomeata repo owner

    Hi Philipp :-)

    right, and I bet it works because this environment variable is set, telling the program that the encoding of your system is UTF-8. Is there a way to set the encoding in cmd.exe?

  4. Philipp Uhl

    Well...

    >echo %LANG%
    %LANG%
    >set LANG=de_DE.UTF-8
    >echo %LANG%
    de_DE.UTF-8
    >arbtt-stats --dump-samples
    Processing data [=========================================================] 100%                                                                                2018-07-09 15:42:27 (2563ms inactive):
        ( ) \Device\HarddiskVolume6\Windows\explorer.exe: Program Manager
        ( ) \Device\HarddiskVolume6\Windows\SystemApps\Microsoft.Windows.PeopleExperienceHost_cw5n1h2txyewy\PeopleExperienceHost.exe: arbtt-stats: <stdout>: commitBuffer: invalid argument (invalid character)
    

    You are right, it was not set, but setting it does not help either :/

    I do consider this a very minor issue though as you can use the Bash on Ubuntu shell. Btw, Powershell does not work either

  5. nomeata repo owner

    I do consider this a very minor issue though as you can use the Bash on Ubuntu shell. Btw, Powershell does not work either

    Ok, if it is not blocking you right away I think I will punt on this right now.

  6. Log in to comment