Skip to content

Commit

Permalink
Fixed non UTF-8 chars.
Browse files Browse the repository at this point in the history
  • Loading branch information
sa666666 committed Dec 20, 2024
1 parent dacf661 commit 27a40f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/PaletteHandler.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ void PaletteHandler::generateCustomPalette(ConsoleTiming timing) const
{
constexpr float SATURATION = 0.30F; // default NTSC saturation
vector2d IQ[NUM_CHROMA];
// YIQ is YUV shifted by 33°
// -90° + 33° = -57° would create a greenish yellow
// -90° + 53° = -37° creates gold (which is correct according to the documentation)
// YIQ is YUV shifted by 33°
// -90° + 33° = -57° would create a greenish yellow
// -90° + 53° = -37° creates gold (which is correct according to the documentation)
constexpr float offset = (33 + 20) * BSPF::PI_f / 180;
const float shift = myPhaseNTSC * BSPF::PI_f / 180;

Expand Down

5 comments on commit 27a40f6

@thrust26
Copy link
Member

@thrust26 thrust26 commented on 27a40f6 Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the problem with these? I can read the old ones in VS and here.

@sa666666
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're weren't proper UTF-8, but from the extended ASCII set. And in Xcode for Mac, it complained about them. They also viewed fine in Linux, but when I analyzed the file, it (properly) said it was an ASCII file, and not UTF-8. I suppose I could have turned off the option in Xcode, but it seems better to use proper UTF-8 when appropriate.

@thrust26
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, the problem is, Windows seems to produce such chars. How can we avoid that in the future?

@sa666666
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess make sure the editor is in UTF-8 mode, and not Windows-1252.

@thrust26
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I think I found the setting in VS.

Please sign in to comment.