Questions tagged [7-bit]

7-bit is original bit length of the ASCII standard providing up to 128 characters.

7-bit is the original bit length of ASCII characters allowing the standard to have up to 128 characters.

Some emails will be seen with the Content-Transfer-Encoding: 7bit which indicates to parse the content of the email as ASCII.

UTF-8 allows a larger character set and has become more popular in recent years

36 questions
15
votes
6 answers

Encoding an integer in 7-bit format of C# BinaryReader.ReadString

C#'s BinaryReader has a function that according to MSDN, reads an integer encoded as "seven bit integer", and then reads a string with the length of this integer. Is there a clear documentation for the seven bit integer format (I have a rough…
Elazar Leibovich
  • 32,750
  • 33
  • 122
  • 169
5
votes
1 answer

How to divide a decimal MIDI pitch-bend value into 2 separated 7 bit values correctly?

I'm trying to make a sort of custom midi player, to do so I'm using an array that already has memorized correctly the midi messages data like this: int array[3000][4]={{time,status,data1,data2},{...},...} when I want my program to send the midi…
Febio Mosca
  • 127
  • 10
4
votes
1 answer

Opening a file in text mode can lead to data loss in Python: why?

The documentation for codecs.open() mentions that Files are always opened in binary mode, even if no binary mode was specified. This is done to avoid data loss due to encodings using 8-bit values. How can using text mode for a file lead to "data…
Eric O. Lebigot
  • 91,433
  • 48
  • 218
  • 260
4
votes
7 answers

Accessing 8-bit data as 7-bit

I have an array of 100 uint8_t's, which is to be treated as a stream of 800 bits, and dealt with 7 bits at a time. So in other words, if the first element of the 8-bit array holds 0b11001100 and the second holds ob11110000 then when I come to read…
howamith
  • 181
  • 3
  • 15
4
votes
5 answers

Convert text to 7-bit ASCII from command-line

I'm on OS X 10.5.5 (though it does not matter much I guess) I have a set of text files with fancy characters like double backquotes, ellipsises ("...") in one character etc. I need to convert these files to good old plain 7-bit ASCII, preferably…
Alexander Gladysh
  • 39,865
  • 32
  • 103
  • 160
4
votes
3 answers

how to convert a character to 7 bit even parity in php

I want to convert a Character to a 7 bit even parity. Can you please suggest me, how to implement this?
Nidhin Baby
  • 1,618
  • 4
  • 14
  • 16
4
votes
1 answer

R Project and MQL4 convert forecast object in R to Vector

I am using the forecast package in R and this creates a forecast object. I am wanting to convert the forecast into a vector so that I can use 7bits wrapper and use R in MQL4 code. Example forecast code: > forecast(fit, h=5) Point Forecast Lo…
Jerry
  • 133
  • 10
3
votes
1 answer

Calculate SMS Length/Parts C#

I have been asked to help a friend in his application which has an indicator/counter that should show the end-user how many characters have been written in the text box and also how many parts in this written text/SMS?. The easiest part was about…
Ahmed Negm
  • 865
  • 1
  • 11
  • 30
2
votes
1 answer

Base64 incompatible with 7-bit GSM encoding?

Since I am not able to compress a 256-byte long md5-like string within 160 characters, I decided to use Multi-part message in Android to divide the SMS into several parts and the receiver will listen the SMS then combine those messages. I use the…
dumbfingers
  • 7,001
  • 5
  • 54
  • 80
2
votes
2 answers

Need help using Read7BitEncodedInt

I've been searching for 2 hours or better for a way to use the Read7BitEncodedInt method for this. I need to use it somehow to reduce my file size (in this case likely by 100mb or more). I was also looking at using the ReadString method since it…
Grimbly
  • 194
  • 8
2
votes
1 answer

utf-8 character set, 7bit encoding, PHP adding strange characters

I'm sorry my title is not better, but I'm not even sure how to categorize this problem. I know this has to do with encoding, but I am not sure how. I am doing a project for an ESP. Their emails are 7-bit encoded, with utf-8 character set (which…
richard
  • 12,263
  • 23
  • 95
  • 151
1
vote
1 answer

Python Decode OctetString 7-bit Characters

I'm currently playing around with decoded asn1 data and can't wrap my head around correctly decoding the data into strings (if the data is numerical it's working absolutely fine) Example: Hex String -> 0ddc2f93c6c7bb10 Expected Result ->…
zeitghaist
  • 89
  • 9
1
vote
3 answers

Convert Extended ASCII or Unicode to 7-bit ASCII (<128) equivalent including special characters

How can I convert characters in Java from Extended ASCII or Unicode to their 7-bit ASCII equivalent, including special characters like open (“ 0x93) and close (” 0x94) quotes to a simple double quote (" 0x22) for example. Or similarly dash (– 0x96)…
Peter
  • 400
  • 1
  • 13
1
vote
0 answers

7-bit circular buffer with bit option flag in a byte

I'm hoping someone can help me on this. I made a function for an 8051 microcontroller that accepts input from a button and I'm using a cyclic buffer of 8 bits to store key states so I can make debouncing not an issue. The code to store data in the…
Mike -- No longer here
  • 2,064
  • 1
  • 15
  • 37
1
vote
0 answers

Overcome 70 character limit when sending non-english SMS in Android

Currently i'm using SmsManager's sendTextMessage. Messages may contain non-english characters, but all of the characters are part of the GSM 7bit alphabet. Is there a way to overcome the 70 chars (UTF-8) limit and create a 160 chars message? Is…
ion
  • 79
  • 2
  • 10
1
2 3