0

I just downloaded Mono, Jetbrains Rider and cloned a c# (private) github project.

This project was written in Windows and use Windows-1252 encoding and the source code contains special characters (á, ç, ã, etc). If I try to build this project (both using Rider os MSBuild on bash), I get

MyFile.cs(16, 3): [CS1056] Unexpected character '�' I configured Rider so it shows the file correctly, but making

cat MyFile.cs

Shows the � mark symbol.

Is there anything I have to set on Rider / MSBuild so it reads the files correctly?

JSBach
  • 4,679
  • 8
  • 51
  • 98
  • 2
    What encoding do the files use? – SLaks Aug 08 '18 at 21:31
  • I'm not that proficient in Linux, but that symbol typically represents a character that is missing in your font or character set. If unicode characters are in use, then make sure you are using UTF-8 instead of ASCII, and that the font you are using supports those international characters. – Dave Smash Aug 08 '18 at 21:31
  • @SLaks updated the question: they usw Windows-1252 – JSBach Aug 08 '18 at 21:33
  • @ElementalPete True, but this is a compile error. – JSBach Aug 08 '18 at 21:33
  • Did you specify `1252` in you `.csproj` file? – user4003407 Aug 08 '18 at 21:44
  • So it seems like Linux is not handling the Windows encoding properly. See this link for techniques to change the file's encoding: https://stackoverflow.com/questions/2014069/windows-1252-to-utf-8-encoding – Dave Smash Aug 08 '18 at 21:45
  • @ElementalPete I cannot change the file encoding because windows users are using them. – JSBach Aug 08 '18 at 23:28

0 Answers0