Questions tagged [ansi]

ANSI stands for American National Standards Institute. Please do not use this tag, see the full tag wiki for alternatives.

American National Standards Institute

"The Institute oversees the creation, promulgation and use of thousands of norms and guidelines that directly impact businesses in nearly every sector: from acoustical devices to construction equipment, from dairy and livestock production to energy distribution, and many more. ANSI is also actively engaged in accrediting programs that assess conformance to standards – including globally-recognized cross-sector programs such as the ISO 9000 (quality) and ISO 14000 (environmental) management systems."

(Source: http://ansi.org/)


Instead of using this tag, please use:

  • for questions about the C language standard colloquially known as ANSI C
  • for questions about ANSI character encoding (which is actually obsolete, imprecise, and incorrect terminology; perhaps see the next item instead)
  • for questions about ANSI codepages (possibly with )
  • for questions about standard SQL
  • for questions about ANSI escape sequences and ANSI colors on terminals
  • for questions about the colors used in ANSI escape sequences
  • for questions about the program ANSICON
  • for questions about the datatype in Delphi
  • for questions about the ISO C++98 programming language standard
268 questions
4
votes
1 answer

Saving a Linq to Xml file as ANSI instead of UTF-8 in C# (Ivy)

In C#, I need to create XML files for use with Ivy and NAnt, but am having difficulty in getting the right encoding in the output file. If I use XElement's .Save("C:\foo.xml"), I get the correct looking file, but Ivy and/or NAnt gets upset, as the…
Brett Rigby
  • 6,101
  • 10
  • 46
  • 76
4
votes
2 answers

Perl - Convert PC UTF-8 to PC ANSI

I have a file that is encoded PC UTF-8. I would like to convert the file into PC ANSI. I have tried the below, but I always get the output file to be PC UTF-8. use Encode; $infile = $ARGV[0]; open(INFILE, $infile); my $outfile =…
user333746
  • 2,605
  • 3
  • 18
  • 11
4
votes
4 answers

Convert ANSI characters to UTF-8 in Java

Is there a way to convert an ANSI string to UTF using Java. I have a custom serializer that uses readUTF & writeUTF methods of the DataInputStream class to deserialize and serialze string. If i receive a string encoded in ANSI and is too long,…
n002213f
  • 7,805
  • 13
  • 69
  • 105
3
votes
2 answers

Can I find out if string to ANSI conversion will result in loss of data?

Say, when I convert a string into a byte array using single-byte encoding, some characters will be replaced with '?': string strData="©"; byte[] bytesData = Encoding.ASCII.GetBytes(strData); Is there any way to find out if a string will lose some…
ahmd0
  • 16,633
  • 33
  • 137
  • 233
3
votes
5 answers

delphi declaring size of ansi string

Its easy to define a string at the size of 3 (in old delphi code) st:string[3]; now, we wish to move the code to ansi st:ansiString[3]; won't work! and for adcanced oem type st:oemString[3]; same problem, where type OemString = Type…
none
  • 4,669
  • 14
  • 62
  • 102
3
votes
1 answer

Writing ANSI string to Unicode file over FTP

I have the following Visual Basic 6.0 function which writes an ANSI string to a new file over FTP. I would like it to write the file as UTF-16LE. Is there any good way to do that within this following method? Public Sub writeToFile(ByVal FTPServer…
cc0
  • 1,960
  • 7
  • 40
  • 57
3
votes
1 answer

Convert UTF-8 to ANSI using VBA

I have a VBA Excel code which takes Japanese data from excel sheet compares it with Japanese data in text file and replaces Japanese words with English words. But I am supposed to be able to do this on UTF-8 text file. This code replaces all the…
PHP Enthu
  • 105
  • 1
  • 2
  • 8
3
votes
1 answer

Need to batch convert a large quantity of text files from ANSI to Unicode

I have a lot of ANSI text files that vary in size (from a few KB up to 1GB+) that I need to convert to Unicode. At the moment, this has been done by loading the files into Notepad and then doing "Save As..." and selecting Unicode as the Encoding.…
user2724502
  • 181
  • 2
  • 3
  • 13
3
votes
1 answer

Python error "io.UnsupportedOperation: write" when writing UTF-8 Characters

I am using python 3.5.2 interpreter in a Windows 10 environment. I entered the following lines according to the Google's Python Course: >>> import sys,os,codecs >>> f=codecs.open('foo.txt','rU','utf-8') >>> for line in f: ... f.write('£…
host_255
  • 361
  • 2
  • 7
  • 18
3
votes
2 answers

Set the encoding to ANSI in PowerShell 2.0

I want to set the encoding of a file to ANSI using the parameter -Encoding of the Set-Content cmdlet, I tried this one but it didn't work: Set-Content -LiteralPath "$filePath" -Encoding Default
3
votes
0 answers

Invalid Special character "Line Separator" LS is showing on mobile device chrome browsers

Please let me explain the scenario: We have 1000 of physical html files having say news content which we dynamically list and show in our desktop and mobile site. The content is having "Live separator" character, So if i go and see the physical…
Sachin Dabas
  • 131
  • 2
3
votes
2 answers

WinAPI Unicode and ANSI functions

Most WinAPI calls have Unicode and ANSI function call For example: function MessageBoxA(hWnd: HWND; lpText, lpCaption: LPCSTR; uType: UINT): Integer; stdcall;external user32; function MessageBoxW(hWnd: HWND; lpText, lpCaption: LPCWSTR; uType:…
RepeatUntil
  • 2,272
  • 4
  • 32
  • 57
3
votes
1 answer

QueryString encoding of non-ANSI characters in ASP.Net

I'm passing "Malmö" as a Request.QueryString parameter to a page. However, the code sees it as "Malm�" meaning that string comparison fails. All globalization settings are set to UTF-8 in web.config. Am I missing something? Edit: The querystring…
Bartek Tatkowski
  • 975
  • 1
  • 6
  • 16
3
votes
2 answers

What is this " " called?

I am trying to parse a website, and I am trying to replace all occurrence of " " in a string. This doesn't seem to be space or tab, what is this? a more general question: how do you search for the name of some char you don't know? I tried ansi and…
muyueh
  • 1,018
  • 13
  • 16
3
votes
1 answer

D (Tango) can read and write ANSI files?

With D and Tango library can I read and write in the ANSI encoding ?
Sebtm
  • 7,002
  • 8
  • 29
  • 32