Project

General

Profile

Bug #15481

Feature #10034: Translation web platform

Feature #11759: Install & configure a fresh weblate on the VM

Weblate bash UTF8 broken

Added by u over 1 year ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/30/2018
Due date:
% Done:

0%

Feature Branch:
Type of work:
Sysadmin
Blueprint:
Starter:
Affected tool:

Description

When doing a git log -p on the weblate VM as user weblate I get broken UTF-8 output.
When doing the same on my computer, things work out correctly, thus I suspect a problem on the VM.
I think it would be useful to fix this because we will be using scripts to verify that po files are indeed in UTF-8 and we want to be able to let a human confirm things if this is not the case. Hence my request to please make it work?

 #~ msgstr "" 
-#~ "<a href=\"https://www.lush.com/\" title=\"Lush Digital Fund - 11 000<E2><82><AC>\">" 
-#~ "[[!img lib/partners/lush.png link=\"no\"]]</a>" 
+#~ "<a href=\"https://www.lush.com/\" title=\"Lush Digital Fund - 11 000<E2><82><AC>" 
+#~ "\">[[!img lib/partners/lush.png link=\"no\"]]</a>" 

History

#1 Updated by groente over 1 year ago

  • Assignee changed from groente to u
  • QA Check set to Info Needed

Can you provide exact steps to reproduce? UTF-8 seems to render fine here..

#2 Updated by u over 1 year ago

  • Assignee changed from u to groente
  • QA Check deleted (Info Needed)

This happens in Weblate's VCS folder. I can correctly not connect so I cannot really tell you where it is. From the top of my head it's in in /var/lib/weblate/vcs/tails or something like that.

There, as user weblate when doing a git fetch tails master and then "git diff master --" I get this broken UTF8. Note that on other machines I connect to this works fine - so I think it's something on the VM that is not quite right.

#3 Updated by u over 1 year ago

u wrote:

This happens in Weblate's VCS folder. I can correctly not connect so I cannot really tell you where it is. From the top of my head it's in in /var/lib/weblate/vcs/tails or something like that.

There, as user weblate when doing a git fetch tails master and then "git diff master --" I get this broken UTF8. Note that on other machines I connect to this works fine - so I think it's something on the VM that is not quite right.

As written previously you can see this when doing git log -p as user weblate too - easier than the previous approach.

#4 Updated by groente over 1 year ago

  • Assignee changed from groente to u
  • QA Check set to Info Needed

That's odd, I see UTF8 rendered just fine in the git log (running as user weblate), also the euro symbol after Lush Digital Fund that you mentioned renders fine. Are there any particularities concerning your terminal? Running screen perhaps or so?

#5 Updated by emmapeel over 1 year ago

I can reproduce this without screen, using sudo -u weblate git log -p from /var/lib/weblate/repositories/vcs/tails/index

#6 Updated by u over 1 year ago

  • Assignee changed from u to groente
  • QA Check deleted (Info Needed)

groente wrote:

That's odd, I see UTF8 rendered just fine in the git log (running as user weblate), also the euro symbol after Lush Digital Fund that you mentioned renders fine. Are there any particularities concerning your terminal? Running screen perhaps or so?

No. I use gnome-terminal on a more a less default Debian Stretch machine.
Can you try from a Tails instance for example?
It looks like emmapeel can also reproduce this problem.

#7 Updated by intrigeri over 1 year ago

I'd be curious to see the output of these commands in the shell that exposes this problem:

locale
echo $TERM

#8 Updated by u over 1 year ago

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "de_DE.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

#9 Updated by u over 1 year ago

intrigeri wrote:

I'd be curious to see the output of these commands in the shell that exposes this problem:

[...]

locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=de_DE.UTF-8
LANGUAGE=
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

#10 Updated by intrigeri over 1 year ago

So you're using a locale that the system does not support.
I think it's because your SSH client forwards these environment variables (SendEnv LANG LC_* or similar).
I guess it would be fixed by tweaking SendEnv for this host to avoid forwarding these settings :)

#11 Updated by intrigeri over 1 year ago

  • Assignee changed from groente to u

#12 Updated by u over 1 year ago

  • Status changed from Confirmed to Resolved

SendEnv cannot be overridden. The server could instead AcceptEnv to not accept client variables.

I will tweak my bashrc instead to forward LANG=C.UTF-8 - just in case anybody else needs to fix this, they can maybe find my comment :)

#13 Updated by u 10 months ago

  • Parent task changed from #10034 to #11759

#14 Updated by intrigeri 5 months ago

  • Assignee deleted (u)

Also available in: Atom PDF