bugWeeChat - Bugs: bug #35443, Cyrillic characters are changed in...


bug #35443: Cyrillic characters are changed in config files, when starting weechat from linux terminal with LANG=''

Submitter:  Evgeny Burmentyev <virus_found>
Submitted:  Fri 03 Feb 2012 12:23:06 PM UTC
Category:  config file Severity:  3 - Normal
Item Group:  other Status:  Need Info
Privacy:  Public Assigned to:  flashcode
Originator Name:  Open/Closed:  Open
Release:  * 0.3.6 IRC nick:  virus_found
* Mandatory Fields

Add a New Comment Rich Markup

Jump to the original submission

Fri 23 Nov 2012 05:33:13 PM UTC, comment #8: 

but that has the following problem which is quite serious imo: if you run the same weechat from terminals with different charsets, things will break horribly. I don't see what's good about that. User can edit these files with an editor that supports editing utf8 files!

Thu 22 Nov 2012 06:37:58 PM UTC, comment #7: 

No, config files should be saved with terminal charset, not UTF-8, because user can edit these files (while WeeChat is running or not).
WeeChat will convert content to internal charset UTF-8 when reading them, and will convert from UTF-8 to terminal charset when writing them.

Sebastien Helleu <flashcode>
Group administrator
Wed 21 Nov 2012 07:36:47 PM UTC, comment #6: 

Shouldn't config files be always read AND saved in UTF-8 regardless of LANG? Anything else seems like asking for big trouble >___>

Mon 13 Aug 2012 01:41:54 PM UTC, comment #5: 

Not writing the config files is not the best solution for me, because editing them by hand is not recommended (you should do /set to change options).
For me the solution is to fix your $LANG, so that your config files will be written with the appropriate charset.
And having LANG to wrong value can cause troubles in other applications as well.

Sebastien Helleu <flashcode>
Group administrator
Mon 13 Aug 2012 12:37:21 PM UTC, comment #4: 

> Please confirm if it is ok when you use same $LANG to edit file and run WeeChat.

Yes, sure, with the same LANG it's ok.

Though it still bothers me a lot, that weechat changes something in my configs. And changes it wrong.

I thought this option would prevent weechat from updating the configs...

save_config_on_unload = off

...but it wouldn't stop this bug from being reproduced.

Evgeny Burmentyev <virus_found>
Sun 11 Mar 2012 11:40:42 AM UTC, comment #3: 

Some news, did you check your $LANG when you edit file?

Sebastien Helleu <flashcode>
Group administrator
Sat 04 Feb 2012 10:41:52 AM UTC, comment #2: 

And that's a reason why editing config by hand is not recommended, you can break things. It's better to use /set in weechat and let weechat write config files.

Sebastien Helleu <flashcode>
Group administrator
Fri 03 Feb 2012 12:38:08 PM UTC, comment #1: 

WeeChat converts lines read from .conf files from terminal charset ($LANG) to internal charset (UTF-8).
So the $LANG must be the same when you edit file and when you run WeeChat. Otherwise WeeChat cannot decode the lines.

Please confirm if it is ok when you use same $LANG to edit file and run WeeChat.

Sebastien Helleu <flashcode>
Group administrator
Fri 03 Feb 2012 12:23:06 PM UTC, original submission:  

Possible steps to reproduce:

  • Open linux terminal (like ctrl+alt+F1)
  • Write this to irc.conf: freenode.nicks = "`ъ,`ъ_"
  • LANG=''
  • Start weechat.
  • Optinally connect freenode.
  • Then /quit
  • => I saw something like freenode.nicks = "`],`]_" after these steps.
Evgeny Burmentyev <virus_found>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by flashcode (Posted a comment)
  • -email is unavailable- added by virus_found (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-03 flashcode Item GroupNone other
        StatusNone Need Info
        Assigned toNone flashcode
        Release3.3-dev 0.3.6

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code