Register and join over 40,000 other developers!
Recent Topics
-
The Game You Are Waiting For?
WendellHarper - Dec 06 2020 01:21 PM
-
Quora and Reddit Backlinks
WendellHarper - Dec 06 2020 01:14 PM
-
Delete account
pindo - Jul 23 2020 01:33 AM
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

1 reply to this topic
#1
Posted 22 November 2007 - 11:07 AM
Is isalnum ASCII only (locale independent) or does is return true for any character of any locale?
I'm trying to write a short program that converts a binary file into an escaped string that can be included in a source file, thus I need to escape everything not /{0~9a~zA~Z}/.
e.g. static char image = "[converted data goes here]";
Also, is char always 8 bits, or are there platforms where it changes? and is there a simple way of implementing portable data type sizes (not only char).
I'm trying to write a short program that converts a binary file into an escaped string that can be included in a source file, thus I need to escape everything not /{0~9a~zA~Z}/.
e.g. static char image = "[converted data goes here]";
Also, is char always 8 bits, or are there platforms where it changes? and is there a simple way of implementing portable data type sizes (not only char).
#2
Posted 23 November 2007 - 08:05 AM
Depending on your environment, you may not be dealing with ASCII at all. C/C++ works just as well with EBCDIC and other character encodings. You would need to check with your compiler documentation to see if there is any locale information involved.
Similarly, the number of bits a char can store is implementation dependent, depending on your hardware architecture, OS, and compiler.
Similarly, the number of bits a char can store is implementation dependent, depending on your hardware architecture, OS, and compiler.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
My MineCraft server site: http://banishedwings.enjin.com/
Also tagged with one or more of these keywords: ascii
Tutorial Forums →
Other Programming Tutorials →
Python Tutorials →
Python ascii art for banners in command line programsStarted by timesleep8, 15 Sep 2015 ![]() |
|
![]() |
||
Language Forums →
C# →
Need help with character frequency reportStarted by JonErnst, 05 Jul 2014 ![]() |
|
![]() |
||
![]() |
General Forums →
General Programming →
[SOLVED] ASCII. Advice for a StudentStarted by Chanito, 17 Jan 2013 ![]() |
|
![]() |
|
Language Forums →
C and C++ →
[C++] Help with array sorting and ASCII code scanningStarted by Tonchi, 15 May 2012 ![]() |
|
![]() |
||
Language Forums →
C and C++ →
C - Extracting words from string of ASCII charactersStarted by shabu, 08 Mar 2012 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download