Results 1 to 3 of 3

Thread: reading souce code comments in Russian (?)

  1. #1
    Join Date
    Oct 2013
    Filling a much-needed gap in the literature
    Thanked 49 Times in 35 Posts

    reading souce code comments in Russian (?)

    I've been trying to understand some pieces of code with comments that I guess are in Russian, but are rendered for me as mostly Latin-1 vowels with umlauts, accents, etc.

    (It looks rather as though they're simultaneously Northern and Eastern European comments, but all the consonants have fled the region.)

    I'm guessing that what's really going on is that they're in a special encoding of Cyrillic that maps Cyrillic characters to codes in 8-bit ASCII that aren't used in plain American ASCII, so that compilers and editors won't choke on them. (?)

    Is that right, and if so, what's it called? I'd like to find a filter that de-weirds this so that I can run the comments through Google Translate.

  2. #2
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Thanked 698 Times in 378 Posts
    russian language used two 8-bit encodings - cp866 (DOS/OEM) and cp1251 (Windows/ANSI)

  3. Thanks:

    Paul W. (10th May 2014)

  4. #3
    Join Date
    Feb 2013
    San Diego
    Thanked 72 Times in 56 Posts
    There's a standard utility for character set conversion called iconv. There's no automatic way to identify character sets that map onto 7-bit ASCII, but inconv can give you a list of options and you can try them until you find one that works.

  5. Thanks:

    Paul W. (11th May 2014)

Similar Threads

  1. Reading to a buffer
    By Piotr Tarsa in forum The Off-Topic Lounge
    Replies: 17
    Last Post: 27th January 2012, 05:32
  2. Some comments on Tornado
    By m^2 in forum Data Compression
    Replies: 14
    Last Post: 24th November 2008, 02:25
  3. Russian Copulation Scottifed or Not?
    By biject.bwts in forum Data Compression
    Replies: 0
    Last Post: 25th August 2008, 02:05
  4. A small article on ROLZ (Russian)
    By encode in forum Forum Archive
    Replies: 21
    Last Post: 29th April 2007, 16:18
  5. Russian National Anthem
    By encode in forum Forum Archive
    Replies: 2
    Last Post: 8th June 2006, 23:07

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts