6,973 questions
Best practices
0
votes
3
replies
63
views
Searching through Unicode text with an ASCII keyboard in Python
I have a corpus of text which includes some accented words, such as épée, and I would like people to be able to easily search through it using an ASCII keyboard. Ideally, they would simply type ...
1
vote
1
answer
89
views
Why are Grep highlight sequences not read with `pty`?
I was experimenting with creack/pty while learning about pseudo terminals.
I spawned grep and hooked it up with a pseudo terminal device as follows:
package main
import (
"fmt"
&...
2
votes
0
answers
68
views
Bypassing C64's PETSCII to screen code mapping
In upper-case mode, the C64 PRINT ASC("A") prints 65 - the ASCII/PETSCII code.
But POKE 1024,65 prints the shifted A character. PRINT CHR$(65), however, prints the proper 'A' character.
With ...
0
votes
1
answer
181
views
How to use character arrays with Win32 APIs in C++ Builder 12
I am experimenting with C++Builder 12, trying to port some old code from C++Builder 2009.
In that old code, all character strings are defined, for example, like this:
char testString[256]="This ...
0
votes
7
answers
306
views
How does '0' + (n % 10) convert an integer digit to its character representation in C?
I'm learning about converting numbers to characters in C, and I came across the expression:
char c = '0' + (n % 10);
I understand that '0' is a character and n % 10 extracts the last digit of a ...
0
votes
1
answer
52
views
glib iconv() - force conversion to single bytes
I have my own personal movie database system, within which context I NEVER want to see "extended" characters (with accents, umlauts, etc.) in any text fields.
MS Co-pilot tells me that i ...
0
votes
1
answer
78
views
How can I get this IAS assembly code to work properly?
I'm doing this for a school assignment I've been given in Computer Architecture.
The topic is on the Von Neuman Machine (The IAS) and we were tasked to create a program that can do whatever we wanted.
...
0
votes
1
answer
103
views
Trying to connect to a UART CO2 sensor to to get readings using a python script but I can't get any responses following command
I'm using this specific CO2 sensor:
https://www.co2meter.com/products/sprintir6s-100-co2-smart-sensor?variant=43960919195846
for a school project and ultimately I'm trying get it connected to a ...
0
votes
1
answer
206
views
Find different language characters in Snowflake SQL
I have a table that has a text document as one of the columns. These text documents can have about 500-100 words which may contain special characters. I want to find if any of these documents (or ...
-1
votes
3
answers
98
views
How does Linux (via SYS_WRITE) deal with the ASCII (control) codes from 0 to 31?
This recent assembly question got my attention, not for the obviously redundant instructions, but for what the sys_write outputs.
The program tries to output all 256 ASCII characters and does so ...
0
votes
2
answers
56
views
How to check whether a s3 object is in ASCII text
When we want to check whether a file is ASCII text file, we can use this command
~$ file some_file_content_unknown
some_file_content_unknown: ASCII text
Is it possible to use file command to ...
0
votes
0
answers
16
views
Barcode scanner replace text in texbox
I was trying to generate a 128A barcode that backspaces and then inserts the numbers inside the barcode.
Example \x0155\n
So, the Zebra RF:
When the barcode is scanned this happens:
-deletes a ...
0
votes
0
answers
96
views
Swift ASCII string fails, but works in Objective-C
I'm converting some code from Objective-C to Swift and I have a very simple function that reads text from a file into a string.
@implementation DecodeFile
- (NSString * _Nullable)readFile:(nonnull ...
0
votes
1
answer
64
views
How to pass UNICODE characters in a url? [duplicate]
I am attempting my first steps in web dev with Django. Can anybody help me modify somehow the paths so that <slug:slug> works for Unicode characters, not only ASCII?
from django.urls import path
...
2
votes
3
answers
370
views
PowerShell, distinguish between files that are text or binary in nature
I have a script that will look through all files in some folders and then search for text inside them. The problem is that I want it to selectively only search through files that are not binary in ...
1
vote
1
answer
52
views
How to optimize the output of a large number of characters on the console?
I am developing a program that plays video in the console using ascii characters.
This is an example of such a program text
To calculate the correct characters, I use opencl for parallelization.
Here ...
0
votes
1
answer
81
views
I replaced < with <, but it renders as < [duplicate]
I'm using vanilla JavaScript to help me prepare some text for injection into an HTML page.
The script takes a bunch of text strings (words and part-words), adds links around each one, and puts them in ...
1
vote
1
answer
137
views
Delphi 11 - controlling interaction between ASCII and UTF-8 in TStrings eg. in Memo
If I copy and paste some UTF-8 text [eg. “Wands!”] into a TMemo, it displays as expected.
If I generate a string containing the 3 bytes (as characters) for '“' (ie 0xE2, 0x80, 0x9C) and use Memo1....
2
votes
1
answer
226
views
How to check for the "0-31 (ASCII control characters)" in python? (using regex if possible) [duplicate]
I'm dealing with a program that will have the user typing into a entry widget, then the name will be checked to see if it is valid. If it is, the file gets renamed, if not, [something else happens].
...
-1
votes
1
answer
87
views
how i can use ascii code for send to serial port
I am beginner to C#, could anyone help me?
I want to send code to my board
now I am using ModBus Poll application, with modeBus Poll i got this Ascii code :
3A 30 31 30 36 30 30 30 30 30 30 30 30 46 ...
0
votes
3
answers
211
views
Decimal -> HexaDecimal -> Character Encoding in XSLT
(1) My requirement is to convert a DECIMAL INPUT to hexadecimal notation with fixed 8 digits
(2) Convert/Map HEXADECIMAL RESULT to character set by picking 2 HEXADECIMAL characters at a time and ...
-1
votes
1
answer
123
views
SciLab: csvRead() is reading all the columns of data in my csv file as one column meaning i cant index specific columns
Quite new to Scilab so struggling a bit with this, I have data imported from an oscilloscope as a csv file, I need to manipulate this data so I'm importing it with csvRead() but when I do this it is ...
1
vote
0
answers
113
views
Handling ASCII Encoding Error When Saving TIFF Files in Python
I'm working on a Python script that processes images and saves them as TIFF files using the tifffile library. The script runs as part of a larger pipeline where I use the ashlar tool to process these ...
1
vote
1
answer
78
views
Hex to Ascii doubling the length count
When I convert the hex value to ASCII and pass on the ASCII to textField, it doubles the text length. Below is the conversion I used and if you see from the screenshot, the total characters for both ...
2
votes
1
answer
152
views
Read and Parse a Text file into a Matrix in Octave
I have a text file with many thousands of rows which look like this
20120601 000000603,1.234610,1.234780,0
where the first two whitespace separated columns are a date and time representation and the ...