Skip to content

client log has binary \0 as every second character #652

Closed

Description

@jnweiger

Seen with OpenCloud Beta OpenCloud Beta 3.0.0.1828 (downloaded from CI)

OpenSUSE Leap. Start the client with

env LANG=C opencloud --logdebug --debug --logfile /tmp/oc-client.log

$ less /tmp/oc-client.log
"/tmp/oc-client.log" may be a binary file. See it anyway?

Image

oc-client.log

Activity

  1. TheOneRing commented on Nov 6, 2025

    @TheOneRing
    Contributor

    The log file is utf16 encoded. with a bom

  2. moved this from Qualification to Done in OpenCloud Team Boardon Nov 6, 2025
  3. jnweiger commented on Nov 6, 2025

    @jnweiger
    SponsorContributorAuthor

    Yes it is UTF16, but why?
    I'd prefer UTF8.

  4. TheOneRing commented on Nov 6, 2025

    @TheOneRing
    Contributor

    Qt internally used utf16, we write a lot of log files....
    You can either use a modern text editor that supports boms or pipe the output to a terminal, in which case it'l be utf8 encoded.

    --logfile -

  5. jnweiger commented on Nov 6, 2025

    @jnweiger
    SponsorContributorAuthor

    Strange: /tmp/OpenCloud Beta-crash.log is in plain UTF8 without a bom.

    Strange: when starting, the desktop client explicitly talks about choosing utf8:
    $ env LC_ALL=C LANG=C opencloud
    Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
    Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.

    Nevermind. Workaround:

    • iconv -f UTF-16 -t UTF-8 < /tmp/oc-client.log | less
  6. guruz commented on Jun 15, 2026

    @guruz
    Contributor

    Can we switch this to utf8? It's annoying to have to use other tools (rg instead of grep) etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions