Liam Bailey
Liam Bailey

Reputation: 5905

Changing file encoding from UTF-8 to ANSI

I am creating an xml and .blm file from one set of data, I am taking text data in iso-8859-1 and converting it to UTF-8 using

$desc = iconv("ISO-8859-1", "UTF-8//TRANSLIT", $desc);

This works great for the XML, but those getting the BLM have asked that it be in ANSI. How can I convert the .blm file to ANSI, is there anyway to do it when I am writing to the file? or after I have created the file?

Upvotes: 0

Views: 20594

Answers (1)

netcoder
netcoder

Reputation: 67745

Typically, ANSI is referred to as Windows-1252 (or CP-1252):

$desc = iconv("ISO-8859-1", "WINDOWS-1252", $desc);

Upvotes: 3

Related Questions