1251 for Cyrillic

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello!
Is there any way to change encoding of a C file in Atmel Studio to CP1251 instead of Unicode?
The LCD (MELT MT-20S4A) has built-in symbols' code table with Cyrillic letters, which is equal to CP1251 codes (Russian aplhabet starts from 0xC0).

Feels like AS has no encoding but Unicode, which converts Cyrillic letters into 2 bytes...

I've tried converting C file with Russian letters to ANSI using Notepad++, then AS showed the message, that "some of characters were replaced with Unicode symbols (rhombus with a question).

AS version is 5.1

This topic has a solution.
Last Edited: Wed. Sep 27, 2017 - 09:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Any AS version 5 is trash, current version is 7,  AS 4 is still usable with older gen AVR's.

 

 

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Open the file in Atmel Studio

Do:

  • File / Save (theFileName.c) As...
  • Click the down arrow by "Save"
  • Save with Encoding...
  • Select desired coding from list

 

Edit: This is in AS7, not sure of other versions

David (aka frog_jr)

Last Edited: Wed. Sep 27, 2017 - 09:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah. This is the solution, but I've already done it :-)

File - Advanced Save Options... in AS5.

Thanks for reply!