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=''

Submitted by:  Evgeny Burmentyev <virus_found>
Submitted on:  Fri 03 Feb 2012 12:23:06 PM UTC  
 
Category: config fileSeverity: 3 - Normal
Item Group: otherStatus: Need Info
Privacy: PublicAssigned to: Sebastien Helleu <flashcode>
Originator Name: Open/Closed: Open
Release: 0.3.6IRC nick: virus_found

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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!

Anonymous
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>
Project AdministratorIn charge of this item.
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 >___>

Anonymous
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>
Project AdministratorIn charge of this item.
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...

[plugin]
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 Feb 2012 12:38:08 PM UTCflashcodeItem GroupNone=>other
      StatusNone=>Need Info
      Assigned toNone=>flashcode
      Release1.1-dev=>0.3.6

    Back to the top


    Powered by Savane 3.1-cleanup