Best way to reverse a string

I've just had to write a string reverse function in C# 2.0 (i.e. LINQ not available) and came up with this: public string Reverse(string text) { char[] cArray = text.ToCharArray(); string...

preg_match and UTF-8 in PHP

I'm trying to search a UTF8-encoded string using preg_match. preg_match('/H/u', "\xC2\xA1Hola!", $a_matches, PREG_OFFSET_CAPTURE); echo $a_matches[0][1]; This should print 1, since "H" is at...

Is there a C library to convert Unicode code points to UTF-8?

I have to go through some text and write the UTF-8 output according to the character patterns. I thought it’ll be easy if I can work with the code points and get it converted to UTF-8. I have...

UTF8 processing in C

I have basic understanding of UTF8: code points have variable length, so a "character" can be 8 bits, 16 bits, or even longer. What I'm wondering is if there some sample code, library, etc in C...

Unicode character rendered at a different size in IE6

In a web application, I have to display a special unicode character, know as BLACK DIAMOND (U+25C6) (see here for more details). Here is a sample : ◆ The font defined for the page is Arial, with...

Python: Proper way to store list of strings in sqlite3 or mysql

I'm trying to store a list of string values into a sql database. list = ['please','help','me'] I've tried converting to unicode and using the array.array('u',list) unicode_list =...

How do I reverse a String in Dart?

I have a String, and I would like to reverse it. For example, I am writing an AngularDart filter that reverses a string. It's just for demonstration purposes, but it made me wonder how I would...

The fastest backup/restore strategy for Azure SQL databases?

What is the fastest way to backup/restore Azure SQL database? The background: We have the database with size ~40 GB and restoring it from the .bacbac file (~4GB of compressed data) in the native...

Run javascript function on cells of CSV / excel file

I have a javascript function here (view page source) that converts all the simple-text content of a text box into Unicode Devnagri script, following a character substitution algorithm, and outputs...

NodeMailer Request timeout on Heroku (Mandrill, SMTP), works on localhost

I'm using nodemailer in an express / angular app and tried a few things with a basic mailer, using nodemailer. I tried using Hotmail as the service and it worked on localhost but on heroku it...

encode unicode characters to unicode escape sequences

I've a CSV file containing sites along with addresses. I need to work on this file to produce a json file that I will use in Django to load initial data to my database. To do that, I need to...

Swift - Replacing emojis in a string with whitespace

I have a method that detects urls in a string and returns me both the urls and the ranges where they can be found. Everything works perfectly until there are emojis on the string. For...

Get emoji flag by country code

There is a list of countries codes, I need to attach emoji flag to each one. Is there a way to extract unicode from it or find emoji for country code? This npm example looks similar for my goal...

How I can convert file with any format to text format using Python 3.6?

I am trying to have a converter that can convert any file of any format to text, so that processing becomes easier to me. I have used the Python textract library. Here is the documentation: ...

Why is the Rust libstd linked dynamically without using -C prefer-dynamic flag after compiling a dynamic library?

I am having an issue understanding how Cargo links binaries when building a dynamic library. To understand it better, I took the coreutils project and tried to build 'ls' changing Cargo.toml and...

Mixed encoding and make everything UTF-8

I have some texts that has various encoding, For example the following text, has mixed encoding of UTF-8 and ISO-8859-1: محتوای میکس شده و بخش...

Remove Hebrew vowels (nikkud) from selected Unicode Hebrew text

I want to select a string of Unicode Hebrew text in a Word document and remove the Hebrew vowels (aka nikkud) without changing anything else. I need to remove Unicode characters in a given range...

How to use Chrome Profile in Selenium Webdriver Python 3

So whenever I try to use my Chrome settings (the settings I use in the default browser) by adding options = webdriver.ChromeOptions() options.add_argument("user-data-dir=C:\Users\... (my webdriver...

How can I get Bangladeshi taka symbol "tk" or Unicode Character " ৳ " in java

I was doing like tvCartTotalAmount.setText("tk "+String.format("%.2f",totalAmount)+"/-"); the output was tk 315/- I want to show like ৳ 315/- How can I do that?

key.char gives AttributeError when using Key.f5 in Python Pynput

Im trying to make a very simple program that presses the F5 key when I press another key (example q). Whenever I use regular characters a-z I compare using if key.char == 'q': This works fine...

Character encoding error when writing url in FPDF2

I'm working in Python 3.7 and have the python port of FPDF 2.0.3 (https://pypi.org/project/fpdf2/) running. I'm working with a lot of unicode symbols, and some of them need to be a part of the...

hot to fix 'Can’t make {button returned:"Connect", text returned:"test"} into type Unicode text.'

I'm trying to create a little automator app to connect to a wireless network via terminal on an ssh'd device where the network may be hidden. A series of options leads to an option to simply type...

Win32 GUI C(++) app redirect both stdout and stderr to the same file on disk

I'm creating a Windows service, which cannot have an associated console. Therefore I want to redirect stdout and stderr to a (the same) file. Here is what I discovered so far: Redirecting cout...

How to tell futurize (python-future) to not touch a specific line?

I'm trying to convert Python 2.7 codebase to 3.x using python-future. Sometimes I need to keep a small bit of Python-2-specific code intact, until the migration is complete. For example, import...

GitHub Actions: How to connect to Postgres in GithHub Actions

I am trying GitHub Actions for CI with a Ruby on Rails application. My setup is with VM, not running the Ruby build in a container. This is my workflow yml. It runs all the way without errors...

Python does not read unicode U + FE0F

Suppose I export a WhatsApp chat as .txt and then read it with python. It seems that python does not read the right unicode combinations for emoji containing \uFE0F. For example the rainbow flag...

C++ utf-8 literals in GCC and MSVC

Here i have some simple code: #include <iostream> #include <cstdint> int main() { const unsigned char utf8_string[] = u8"\xA0"; std::cout << std::hex << "Size: " <<...

Is the Demotic script represented in Unicode?

Does Unicode have signs for Demotic script? Is there any font containing such signs? The Unicode has assigned 1072 characters for Egyptian hieroglyphs and for Hieratic (which is the parent system...

UTF-8 support in R on Windows

Since new function 'Beta: Use Unicode UTF-8 for worldwide language support' is added on Windows10, I thought it is possible for R to convert locale environment to UTF-8. However, when I try to...

How to force the C++ compiler to warn when a specific std class function is called?

I'm trying to use UTF-8 std::string and std::filesystem::path in a fool-proof way on Windows 10+ where Beta: Use Unicode UTF-8 for worldwide language support is likely off. C++17 or above. To go...