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
3
votes
1 answer

Delphi XE3: Chr Ansi Version?

I have my own D6 pas library with crypto functions. Today I tried to use it under XE3, and I found many bugs in it because of unicode. I tried to port to AnsiString, but I failed on chr(nnn) which was 8 bit limited under Delphi6. I'm trying to…
durumdara
  • 3,411
  • 4
  • 43
  • 71
3
votes
2 answers

Opening an XML file and converting this to UTF-8

I'm trying to open a xml file (ansi) and converting and saving it UTF-8. Here is my code: using System; using System.IO; using System.Text; using System.Xml; class Test { public static void Main() { string path = @"C:\test\test.xml"; …
user726720
  • 1,127
  • 7
  • 25
  • 59
3
votes
3 answers

Type double byte character into vbscript file

I need to convert → (&rarr) to a symbol I can type into a ANSI VBScript file. I am writing a script that translates a select set of htmlcodes to their actual double byte symbols using a regex. Many languages accomplish this using "\0x8594;"... what…
alumb
  • 4,401
  • 8
  • 42
  • 52
3
votes
2 answers

How to write ANSI compatible bytes in Python 3 (0x80 and up)?

I am new to python and try to write a script which makes byte 0x00-0xff output to a file. This is the code i am currently looking at import sys filename="binarywriter.txt" openmode="wb" charset="utf8" file=open(filename, openmode) for x in…
syss
  • 232
  • 8
  • 18
3
votes
1 answer

C# - Get ANSI code value of a character

I'd like to retrieve the ANSI code value of a given character. E.g. when I now get the int value of the trademark character, I get 8482. Instead I would like to get 153, which is the value of the trademark character in codepage 1252. Some help would…
jdetaeye
  • 183
  • 1
  • 13
3
votes
1 answer

Unicode conversion, database woes (Delphi 2007 to XE2)

Currently, I am in the process of updating all of our Delphi 2007 code base to Delphi XE2. The biggest consideration is the ANSI to Unicode conversion, which we've dealt with by re-defining all base types (char/string) to ANSI types…
Andy Clark
  • 516
  • 1
  • 4
  • 21
2
votes
2 answers

Dictionary Component or source code that can check in multiple languages

We are developing an application in which we need to implement spell checking for Indic languages that use ANSI fonts (not UNICODE) I am looking for a Dictionary Component or Source Code that will allow: To maintain separate dictionaries like for…
Yogi Yang 007
  • 5,147
  • 10
  • 56
  • 77
2
votes
2 answers

how to read a file that can be saved as either ansi or unicode in python?

I have to write a script that support reading of a file which can be saved as either Unicode or Ansi (using MS's notepad). I don't have any indication of the encoding format in the file, how can I support both encoding formats? (kind of a generic…
YSY
  • 1,226
  • 3
  • 13
  • 19
2
votes
1 answer

Determine if a byte array contains an ANSI or Unicode string?

Say I have a function that receives a byte array: void fcn(byte* data) { ... } Does anyone know a reliable way for fcn() to determine if data is an ANSI string or a Unicode string? Note that I'm intentionally NOT passing a length arg, all I receive…
dlchambers
  • 3,511
  • 3
  • 29
  • 34
2
votes
3 answers

PHP strtr vs str_replace benchmarking

I'm curious what the most performant method of doing string transformations is. Given a n input string and a set of translations, what method is the most efficient in general? I currently use strtr(), but have tested various looping methods,…
FtDRbwLXw6
  • 27,774
  • 13
  • 70
  • 107
2
votes
2 answers

GetTempPathA how would I know size in advance?

I am coding in C, using the Windows API. I was looking at the GetTempPathA() function here, and have included the function's syntax below. DWORD GetTempPathA( DWORD nBufferLength, LPSTR lpBuffer ); I can see the path will be stored in lpBuffer,…
user15148251
2
votes
2 answers

How to generate random symbol and get him ansii code [Python]

I want get ansii code for my random symbol, but I don't know how to get him. I made symbol generator: import random string = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',…
clonerson
  • 23
  • 4
2
votes
1 answer

Is there a way to get just the ANSI characters from a string? Utf8decode fails when string contains emojis

First I get a TMemoryStream from an HTTP request, which contains the body of the response. Then I load it in a TStringList and save the text in a widestring (also tried with ansistring). The problem is that I need to convert the string because the…
Daniel
  • 53
  • 7
2
votes
2 answers

ImportError: cannot import name 'BlockBlobService' from 'azure.storage.blob'

I am trying to convert the text files in my Azure blob container from ANSI to UTF-8 encoding without downloading the files locally using python. I am getting the following error when I try to import BlockBlobService in my Python code to deal with…
sparc
  • 345
  • 1
  • 2
  • 13
2
votes
1 answer

Unable to convert special characters in UTF-8 file into ANSI

I have a file that needs to be read and a text has to be added at the end. The program failed due to character "í" . On opening the file in notepad++ (UTF-8) encoding, I could see In my C# code I tried to convert it to Default encoding, but the…
User M
  • 319
  • 1
  • 3
  • 19