Oxidizer wrong translation

Objective-C:

const char* fileBytes = (const char*)[fileData bytes];

is translated to:

namespace
{
	public static class __Globals
	{
		// 
		// 
		public AnsiChar* fileBytes;
 
	}
 
}

b.r.

Thanks, logged as bugs://72833

bugs://72833 got closed with status fixed.

now is translated to:

AnsiChar* fileBytes = (fileData.bytes() as AnsiChar);

shouldn’t be?:

Char fileBytes = (fileData.bytes() as Char);

b.r.

I believe C’s “char” is 8-bit, so AnsiChar is the right match?

In delphi (where I come from) there was no difference, so I assume that in C, C# too :slight_smile: It’s just synonym (Char > AnsiChar). It’s only visual aspect then.

b.r.

In elements, as in VC#, Char is 16-bit (ie UTF-16 Unicode). AnsiChar is 8-bit.

So it should be translated to char then, not ansichar.

b.r.

No. char in C/Obj-C is 8-bit. AnsiChar is the right equivalent in Elements.