Bug: UTF-8 encoding in Github repo, issue #315

We’re having a problem with displaying unicode characters when the users’ PC isn’t set up in a certain way. The UI incorrectly displays non-Latin characters. This may be because github is not recognizing some files as UTF-8. See this discussion thread here:

image

Here’s a .gitattributes file example to define how to encode c# files from Source of .gitattributes - Api.Samples - dRofus Bitbucket

C++ source code

*.rc text *.rc2 text *.cpp text diff=cpp working-tree-encoding=UTF-8 *.c text diff=cpp working-tree-encoding=UTF-8 *.h text diff=cpp working-tree-encoding=UTF-8 *.hpp text diff=cpp working-tree-encoding=UTF-8

Github issue #315 here: BUG: UTF-8 encoding issue · Issue #315 · FashionFreedom/Seamly2D · GitHub

1 Like

Susan,

I believe this is exactly the problem… Like I mentioned I have my Atom editor set at UTF-8 and the app(s) compile fine without the added chars on the unicode chars. If I change this then the files(s) are not interpreted correctly and the extraneous char(s) show up.

UTF

In other words if I compile the exact same code Github just compiled, I get the correct chars, while Github does not. I believe that indeed there it could be something incorrect in the .gitattributes file that’s causing Github to not recognize the files as UTF-8.

Can we just create a test branch and adjust the gitattributes to see what works?

1 Like

Hey I made the .gitattributes update. Building test release now, in about an hour @douglas @grace & @pneumarian please download & test from here:

3 Likes

Here in Ubuntu Linux the problem was not. & the fix didn’t break anything obvious.

:unicorn:

1 Like

Did not fix the Windows install.

Just to be clear… are you saying there is no problem with the Ubuntu distribution?

2 Likes

Yes, I have never experienced this bug in Ubuntu Linux, & the fix didn’t introduce new issues. (which obvious phrasing I wish I’d been able to think of previously.)

1 Like

Hmmm… Well that would seem to indicate there’s something in the Windows build chain on Github that’s not handling the source files as UTF-8? I don’t have the issue with my local builds, and for the heck of it I checked a recent Valentina Gitlab build and there is no issue there either.

1 Like

Hi @Pneumarian, please test this build:

1 Like

@slspencer

Just built 315 b - Fixed here. :slight_smile:

2 Likes

Super fantastic…!

1 Like

Nothing broken over here. @Grace? How’s it look for you?

2 Likes

Sorry, only seeing this now. Having power & water issues again.

image

The % is still looking the same:

image

I’m still wondering if it’s not the MS Visual C++, since this only started when I had to download and install that along with the 1st build.

Something else that happens from time to time that I can’t quite put my finger on, is that it seems to almost hang while doing certain tasks, just long enough to let me think ‘What now?’ but then it goes on. I haven’t been able to quite predict which tasks yet.

2 Likes

@grace what are your language & label preferences?

1 Like

@grace Are you seeing character problems with point names?

1 Like

Sorry about the water and electricy problems. Hope you’re okay! Stay safe!

1 Like

Hi @slspencer GUI language is English Label language is American English Font is now Arial - I tested a few others but the remains "Å "

No, the points are fine.

image

Thank you :slight_smile:

1 Like

So to recap the current state of this issue:

  • Character encoding in the canvas is working.
  • Character encoding in the GUI executable is not working.
1 Like

This works: Encoding characters external to the executable, eg point names read from the XML pattern file:
image

This works: Encoding characters external to the executable, eg file names read from the operating system:
image

This doesn’t work: Encoding some internal characters within the executable. The degree symbol ° displays as  °
image

Are there other instances where the character display isn’t working?

2 Likes

And is this really an encoding problem, or is ° in the code?

1 Like

On my Linux laptop, the angle symbol displays correctly. image

2 Likes