NO

Author Topic: ansi oem  (Read 4819 times)

czerny

  • Guest
ansi oem
« on: May 09, 2012, 03:06:02 PM »
Don't know if this is a bug or what?

If I have a source file for a console projekt and change

file > properties > encoding

from ansi to oem, the file can not be saved anymore. MessageBox('Error writing to file 'tst.c'. Invalid or unknown file format.)

iZzz32

  • Guest
Re: ansi oem
« Reply #1 on: May 09, 2012, 03:34:15 PM »
Furthermore it will delete the file from disk and you will lose your code if you close IDE without saving.

czerny

  • Guest
Re: ansi oem
« Reply #2 on: May 09, 2012, 04:50:49 PM »
Furthermore it will delete the file from disk and you will lose your code if you close IDE without saving.

That is true!  :(

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: ansi oem
« Reply #3 on: May 15, 2012, 04:34:26 PM »
The OEM encoding should really be dropped soon, since pretty much everything these days are Unicode, but I will look at it...
/Pelle

CommonTater

  • Guest
Re: ansi oem
« Reply #4 on: May 15, 2012, 05:10:23 PM »
The OEM encoding should really be dropped soon, since pretty much everything these days are Unicode, but I will look at it...

Hi Pelle... 
If you did drop OEM and/or ANSI... what would be the default replacement?  (utf8?)

I ask so that I can begin now, creating projects that will fall into the new scheme.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: ansi oem
« Reply #5 on: May 15, 2012, 05:38:24 PM »
Hopefully OEM soon, but I doubt it's possible to drop ANSI any time soon. UTF-8 seems pretty popular in general, but UTF-16 may be more popular under Windows.
However, moving to Unicode (and thinking Unicode) in general should be more important than the actual file format I think...
/Pelle

CommonTater

  • Guest
Re: ansi oem
« Reply #6 on: May 15, 2012, 06:19:42 PM »
Hopefully OEM soon, but I doubt it's possible to drop ANSI any time soon. UTF-8 seems pretty popular in general, but UTF-16 may be more popular under Windows.
However, moving to Unicode (and thinking Unicode) in general should be more important than the actual file format I think...

Of course.  I was just hoping for a little leg up, so I could start now to create project and source files that would not require conversion at some point down the road.

While on the topic of unicode... Is it possible to add a compiler flag or #pragma or somesuch that says "Assume string literals are wchar".  I know it's just one character --the L in front of literals-- but you would be absolutely amazed how often I get caught on it... :D






Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: ansi oem
« Reply #7 on: May 15, 2012, 06:56:31 PM »
If you later want to compile with another C compiler you will most likely have to do the work anyway, so why not now?
This is just one of several good reasons not to add this. Ever.
/Pelle

CommonTater

  • Guest
Re: ansi oem
« Reply #8 on: May 15, 2012, 08:07:56 PM »
If you later want to compile with another C compiler you will most likely have to do the work anyway, so why not now?
This is just one of several good reasons not to add this. Ever.

Ok... point taken.  Thank you.

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: ansi oem
« Reply #9 on: May 15, 2012, 09:03:35 PM »
How about applications with mixed strings?

Using the L-prefix is the only way to separate each other.
---
Stefan

Proud member of the UltraDefrag Development Team