Click here to Skip to main content
15,891,423 members
Everything / Unicode

Unicode

Unicode

Great Reads

by Doc Lobster
String conversion using the C++ Standard Library only
by Amit Singh Baghel
A useful tip to export a Div to PDF (with Unicode support) with the help of NReco-PDF Generator for .NET (C#), JQuery and Handler in ASP.NET
by Gregory Morse
Rendering Qur'anic (complex Arabic) scripts with Unicode in a PDF
by Michael Haephrati
A Static Library which can be used for all kinds of database related needs

Latest Articles

by Member 15078716
Unicode / Creating, Writing, Appending / a text (*.txt) file - how to do it
by Michael Haephrati
A Static Library which can be used for all kinds of database related needs
by DebugST
Use [Unicode 14.0.0] version. Can support automatic code generation according to the latest version.
by honey the codewitch
Add UTF-32 support and easy foreach streaming to your apps

All Articles

Sort by Updated

Unicode 

19 Oct 2010 by "Fish" (David B. Trout)
Simple parsing of VS_VERSIONINFO version information strings displayed in an XP-style file-properties "Version" tab
25 Aug 2010 by #realJSOP
Because a DLL isn't a unix format. I think you want to build a .SO file, and for that, you need a unix compiler.
7 Jan 2011 by #realJSOP
Did you try this:cbuff = (LPCWSTR)buff;
29 Sep 2016 by #realJSOP
You have to escape Unicode characters with &# when using them in XML.Google is your friend.
25 Jan 2017 by #realJSOP
Make sure your parameter and field types match (and they should be NVARCHAR).
14 Jan 2016 by _Asif_
You need to have a translation API and the process is quite simple. All you need to do is to call the API (either your own or free translation engine available) on submit button and show the translated text in the other textbox. Try google yourself and see below references* translation -...
3 Oct 2010 by Abhinav S
As per this[^] chart, yes.
27 Jun 2011 by ADNANE-Dev
Hi how can I get Ascii Code of Arabic key From KeyDown Event Winform e.KeyValue is often give english Ascii Code please I need your helps.
7 Jan 2011 by Aescleal
First question is... why are you using malloc or an OS function (HeapAlloc) when there's new/delete built into the language? If you use new or delete you can get rid of the cast and don't have to worry about sizing arrays.Second question is... does the code work if you use the explicit...
11 Apr 2015 by Afzaal Ahmad Zeeshan
This article is for beginners about writing and reading Unicode data from different data sources; including text files, user input, databases. It also demonstrates how to display that data in .NET applications, including ASP.NET web applications.
23 May 2014 by agent_kruger
how to display every symbol of UNICODE on richtextbox which gets displayed as it is and not like a block. My application is in c# win. form.Link :- http://unicode-table.com/en/[^]Thanks in advance
2 Jun 2014 by agent_kruger
I have a unicode number "U+2602", how to convert it into it's particular symbol or charachter and then again convert it back to unicode number? Symbol of the above unicode number is :- (Please see in the link below) https://www.dropbox.com/s/9n8v8rs383he7e3/Unicode%20answer.png[^]
11 Jul 2015 by Ahmad Haghighi
You can use this function: System.Uri.UnescapeDataString(string) I test it for you:string unicode = "\u0633\u0637\u0648\u0631 \u0639\u0628\u0631 \u0627\u0644\u0623\u064a\u0627\u0645 1"; string str = System.Uri.UnescapeDataString(unicode);result (str content) is:سطور...
14 Oct 2015 by Ahsan Mughal
Hello. I need to print arabic character using C++, the prob is i dont know how to, please guide me step by step, how i write that program, how to use unicode. Please help me iam beginner.
19 Apr 2012 by Ajay Vijayvargiya
Many Windows C++ programmers get confused over what bizarre data type identifiers like TCHAR and LPCTSTR are. Here, in brief, I will try to clear out the fog.
10 Feb 2013 by AjayBaroda
I want to create new font and layout for unicode font. I want to include it in language list in windows it shows in taskbar as EN for English. Already many website offer such software for download and install. I know one bhashaindia.com for Indian language. I like to create my own. So...
29 Nov 2010 by Alain Rist
With a helper CharMap class using VC2010 C++0x implementation
15 Jan 2012 by Albertino
Your question is not so clear.I think you need wofstream instead of fstream.Try and let me know.Bye
13 Nov 2011 by Alex Culea
Hi!Has anyone managed to build Boost with ICU support without requiring any DLLs from ICU bin directory (I'm using VS2010)?Regards
17 Nov 2017 by ali_1
I need to insert a text file with unicode characters . Its not inserting completely !. My file having aroud 7 lakhs unicode characters. I need to insert it through SQL without using any programming technilogies. I need to insert it through SQL query Can anyone suggest a solution ? I am using...
21 Nov 2017 by ali_1
Hi All, Inertion failed to while passing a large string to SQL query String as follows: %PDF-1.6 %���� 69 0 obj > endobj 75 0 obj >/Filter/FlateDecode/ID its having around 7 lakhs...
20 Jun 2018 by Amir No-Family
Simply use: var output = System.Net.WebUtility.HtmlDecode(text);
21 Mar 2015 by Amit Singh Baghel
A useful tip to export a Div to PDF (with Unicode support) with the help of NReco-PDF Generator for .NET (C#), JQuery and Handler in ASP.NET
4 Aug 2023 by Andre Oosthuizen
Not my expertise in the least but I found this very interesting. Some research later I found the following, whether it will solve your issue completely, I am not sure but it might point you in the right direction. First of all, a warning from...
13 Oct 2010 by Andreas Gieriet
You question is not clear enough.I assume you want to extract the text from Postscript and use it in a C# program. If so, I would search the net for any of the many Postscript-to-Text extraction programs, call it from your C# program and read the resulting text file into your program...
17 Jan 2011 by Andrew Brock
C++ Supports unicode just fine, there are usually 3 options (4 in this case) options for printing itwprintf(L"€"); //The source file would need to be saved in a unicode format for this to work if it was a true unicode character (which it isn't)printf("\u20AC"); //\u = unicode, 20AC is the...
30 Aug 2011 by André Kraak
When reading the ANSI file in a UNICODE build you first need to read the data into a char buffer and then convert the text into a UNICODE string for further processing.Please note that your code does not handle the possible presence of a BOM (Byte Order Mark) in the file. This article[^] on...
13 May 2013 by Andy Bantly
I would also encourage the programmer to use the TCHAR versions of the library functions, which convert to UNICODE or Ansi based on the project settings.
16 Mar 2016 by Andy Lanng
It could be that SQL Profiler is unable to read that char while SQL itself is ok with it.Check that it actually doesn't work by creating an empty table and inserting unicode into it. Check on the DB if it works.You can send unicode chars in an array instead. You'll need to know the...
13 Oct 2010 by Archit9373284448
u didn't need any outside reference manuals to learn BASH.Linux has its own manuals try to study from them.please note that Linux provide different manuals , for system mans , for programmers mansmake sure when u look into the manuals it must be of (type 1).or u can mention to man...
29 May 2011 by arminamini
Hi.how can i show my url in addressbar un unicode format.when i write unicode text in my response.redirect("http://mysite/?current=سلام");it is ok in Chrome and firefox. but i see soem %%?? in IE.i know there is a solution coz this site...
29 May 2011 by arminamini
I dont know why, but i found out it u use response.redirect("with unicode text"); u cant see the unicode text in IE.But if u use Hyperlink or (a Tag) u can see the unicode in URL currectly.For example :
18 Nov 2010 by ARopo
Either come up with an escape sequence for comma e.g. &comma& then replace this with , after the split.or put each field in '' quotes and parse the string to ignore commas in between quotesor use a more unlikely character to separate your fields e.g. ^ instead of comma
8 Apr 2012 by AshishChaudha
try print your querystring in a label control...let me know if it helps..thanks
17 Nov 2014 by Ashokkuma
Hi,I am inserting European language text into nvarchar column in SQL server 2008. The accented characters are not stored properly in the SQL DB.string strData = "Accented chars- Les caractères accentués français ";DataTable dtTemp = new DataTable( );dtTemp.Columns.Add( "ID", typeof(...
17 Nov 2014 by Ashokkuma
thanks for your replies. The issue seems to occur while reading the csv file into data table before bulk insert. I included the encoding parameter while reading the csv file. (Encoding.Default) and it loads the french text properly and it gets stored in SQL DB without any issues.old code:...
16 Feb 2011 by AspDotNetDev
As I understand it, .Net represents 32-bit characters using a pair (or "surrogate pair") of 16-bit characters. However, I haven't been able to find any functions which deal with these pairs as a single character. For example, Windows forms is capable of displaying this surrogate pair as a single...
10 Dec 2019 by auto9817
There is a great article about unicode manuplation in csharp. http://csharphelper.com/blog/2014/09/explore-unicode-characters-c/[^] Also the above link provides binary executable which you can print available unicode characters in the font "Times New Roman". However, when I try to draw this...
22 Oct 2020 by Avtem
(My IDE is Visual Studio 2019) So, the question is about the macro UNICODE. Which works fine if there is only one source file in the project. However, if there are multiply source files, and UNICODE macro is defined only in one of them, linker...
4 Nov 2012 by Barakat S.
I made some modifications on the code you posted, I assumed that your web page uses utf-8:Test web application:#!python# -*- coding: utf-8 -*-from bottle import *content_type = 'text/html; charset=utf-8'@route("/ar/")def ar(): response.content_type = content_type ...
1 Oct 2010 by Be Yourself
Make sure wheather you are using the same type of keyboard configuration or change the keypad configurations from control panel and try again.
15 Oct 2010 by Be Yourself
Try Using My.Computer.Keyboard.SendKeys(",", True) The syntax of code is My.Computer.Keyboard.SendKeys(keys ,wait) I think it should work fine.
13 May 2011 by blytle
also since _bstr_t's have operator (char *) and operator (wchar_t *) if you have included comutil.h, you can use it to do your conversion.char * source = "this is my source" ;_bstr_t converter_temp(source) ;wstring target ;target = wstring(converter_temp) ;... and the other way...
5 Jul 2017 by BReinhart
First, I am using C++ Builder. I have a method in a class that loads a file into various structs. One of the fields in the struct is defined as, for example: typedef unsigned short namechar; struct MyStruct { int id; namechar name[32]; }; The code uses a for loop to go through all of the...
5 Jul 2017 by BReinhart
Ok, I got it to work. The solution I used is: for (int i = 0; i Items->Add(s); }
18 Feb 2014 by chandanadhikari
i am on 64 bit windows 7 (locale is US English) i have a .bat file whose name is in russian characters. This is inside a folder and again folder name is in Russian . Now using C++, i want to execute that batch file . What all do in need to do ? I understand that using wide char strings...
11 Dec 2015 by CHill60
This article[^] might help you, or possibly this forum post[^]
29 Apr 2021 by CHill60
As Richard has pointed out - you need to translate the document not just change the encoding. Google Translate is available as an API - Cloud Translation Google Cloud[^] but it is not free (nor particularly expensive) There are other similar...
27 Jun 2011 by Christian Graus
There is no such thing as an ASCII Arabic code. ASCII does not contain those chars, that's why you need to get the Unicode value. I assume that one of the other event args passed in gives you that ?
3 May 2013 by Coder Block
Hi guys, I just want to read read unicode text file in normal c.Following code is not working for same,includeint main(){ FILE *ptr_file; char buf[1000]; ptr_file =fopen("input.txt","r"); if (!ptr_file) return 1; ...
25 Aug 2010 by CPallini
Windows and UNIX (and Linux) implement dynamic linking in different ways. See Wikipedia on dynamic linking[^] for info about. :)
17 Dec 2013 by CPallini
Quote:Can I modify my VB code or replace controls with third party controls to support unicode? In principle you could do it (and Google is your friend[^]).However my advice is to completely rewrite it using C#.
23 Jun 2014 by CPallini
See, for instance: Unicode Output to the Windows Console[^].
24 Jul 2014 by CPallini
You cannot compose characters that way. For instance the 'è' character is a single one, not a composition of 'e' and the accent one. If there is a UNICODE character for the average velocity then you might use it. On the other hand if there isn't such a character, you are simply out of luck.
22 Oct 2020 by CPallini
Quote: Do i have to define UNICODE in every single source file? Yes, you have to. You might, however, define it as a compiler option, see /D (Preprocessor Definitions)- To set this compiler option in the Visual Studio development environment |...
2 Jul 2022 by CPallini
Quote: LPVOID lpBuffer; // An LPCVOID is a 32-bit pointer to a constant of any type. // This type is declared as follows: // typedef const void* LPCVOID; const char* pString_from_lpBuffer; ...
2 Jun 2014 by DamithSL
char myValue = Char.Parse("\u2602");convert back to string string str = string.Format(@"\u{0:x4}", (int)myValue);if you need string string myValue = Char.Parse("\u2602").ToString();
1 Feb 2017 by Daniel Pfeffer
As you have the source code for CppSqlite , you could always write an additional (Unicode) method as follows:SQLITE_API int sqlite3_execW( sqlite3*, /* An open database */ const wchar_t *sql, /* SQL to be evaluated...
2 Jul 2022 by Daniel Pfeffer
It is possible to do this in standard C, but it depends on whether your compiler supports the UTF-8 character encoding. See the setlocale and mbstowcs functions for details. Once the data are converted to wide characters, you may use the wcsXXX...
23 Dec 2010 by David Thielen
If you write code that touches a text file, you probably need this.
8 Nov 2021 by DebugST
Use [Unicode 14.0.0] version. Can support automatic code generation according to the latest version.
15 Apr 2012 by Deepak_Sharma_
Hi,I want to print Unicode characters(Hindi) in a Console Application.I tried : static void Main(string[] args) { Console.WriteLine("दीपक"); Console.ReadKey(); }But output was ???? instead of दीपक.Thanks
23 Aug 2010 by Deiveegaraja Andaver
How can i learn Linux shell scripting..Pls provide the weblink and some other useful sites..
15 Jan 2012 by devetslova
Hi guys, I have a problem when I try to write to the file number of wchar_t elements in the file it only appears decimal value of the letters that I wrote.Here is how I trying to write to file:string file_name = name;fstream output (file_name.c_str(), ios::binary|ios::out);for(i=0;...
5 Aug 2015 by Dinesh92
I have an excel file which uses Shivaji fonts, I want to convert it to csv file using google's unicode utf-8 encoding. I have tried all the methods of this but i didn't get any result because when saving file as csv it shows ????? symbols while i need something like this: à ¤Âà ¤•à ¤ŸÃ...
15 May 2011 by Doc Lobster
String conversion using the C++ Standard Library only
29 Apr 2021 by Dr. Bhanu Murthy
I have text file processed output from Cpus programs. This text file I want to convert to local languages say telugu, hindi etc., Is there a solution for this. What I have tried: I tried in cplus program itself using wchar_t and wstring, but...
6 Jan 2012 by DrBones69
Maybe this article will get you started in the right direction.
21 May 2013 by Dusan Paulovic
Hello, I am trying to find a way to compare unicode strings without accents and case, so for example strings 'áíé' and 'AIE' should be considered equal.I have tried boost::locale, also unicode normalisation, but can not get it working correctly.I think that ICU would work, but my boss does...
5 Jun 2020 by Eek Ten Bears
Sorry this is a bit complex to explain but its really a very simple question....just point me at the right web-site. I am using SSIS to write a set of n data files from a database. Simplifying a hell of lot I divide very big SQL data sets...
30 Nov 2015 by EnterCodeWrld
how can i convert excel data having japanese character into utf-8
3 Aug 2011 by Eric Lynch
A class to read Unicode character names and a tool to display/search them.
14 Aug 2013 by Erol Esen
This article has a usable software tool to read RSS feeds and it is especially designed to read and display Unicode characters inside a console window.
7 Jan 2011 by Espen Harlinn
cstring cbuff;if(buff && (buff[0] != 0 )){ cbuff = cstring(buff);}RegardsEspen Harlinn
15 Jan 2011 by Espen Harlinn
This is a great project:ICU - International Components for Unicode[^], it will do the job on windows and linux.RegardsEspen Harlinn
21 Jan 2011 by Espen Harlinn
Sound like the font doesn't not include the required characters. Not all fonts support all unicode code points.RegardsEspen Harlinn
16 Feb 2011 by Espen Harlinn
"As I understand it, .Net represents 32-bit characters using a pair (or "surrogate pair") of 16-bit characters".Net uses UTF16 - and you may find this interesting:http://www.unicode.org/notes/tn12/[^]and this http://www.yoda.arachsys.com/csharp/unicode.html[^]Libraries like...
3 Oct 2011 by Espen Harlinn
It's likely that you are trying to display the text using a font that does not support the required characters - or that you are not using the correct encoding.Have a look at Encoding.GetEncoding[^].Best regardsEspen Harlinn
19 Apr 2013 by Eugene Mayeski
In your case the simplest would be to create UTF8 representation of your string, write ConvertUTF8ToUTF16 function or find an existing one and then call MessageBoxW(0, ConvertUTF8ToUTF16('yourUTF8Constant'), ... ). This way you can deal with any Unicode text in non-Unicode Delphi.Edit: seems...
17 Apr 2012 by Eugene Sadovoi
The solution to your problem explained in details at this link[^].The code from this blog is here (I have nothing to do with this code, it is simply cut/paste):using System;using System.Runtime.InteropServices;public class Test { public static void Main() { ...
4 Oct 2011 by fawadparacha
I want to convert the URDU text via ISO/IEC 10646 standard and UTF-16 in c# .Net:For Example:http://sms.24cro.com/op_1_4_en.htm[^]When I paste URDU text in first text box, it gives 100% right result in second text box. This web page converts it properly, but I am not able to do the...
5 Mar 2015 by Frankie-C
Unicode chars are 2 bytes wide.if length holds the count in bytes then you may read a shorter string and miss the ending null. Because of this other operations on string can runover the allocated space corrupting the stack. In this case change:ReadBytes(buffer,...
29 Jul 2013 by Fredrik Bornander
A good tool for generating Excel sheet is the EPPlus library, which you can download from here; http://epplus.codeplex.com/[^]An example;using System.IO;// Reference EPPlus.dllusing OfficeOpenXml;namespace AccessExcelUnicodeTest { class Program { public static void...
20 Jun 2013 by g77777
Hello good people, As the title says - I have a Non-English string I got from the web (by URLDownloadToFile())and I am trying to convert it to a readable, MySQL friendly, Unicode. This is the code I found in the MSDN but somehow it fails to do the work for me (strLine is the input string)....
15 Jan 2013 by Georges Fahd
hello,I have an interop user controls projects using Interop Forms Toolkit 2.1. All wen well, until we started typing unicode in the text box interop control. If we set our language to Chinese, and type, we get Korean. same for other language. We are using Arial Unicode font, and works in...
9 Aug 2019 by Gerry Schmitz
If you're just "streaming", there's no need to be concerned about "encoding". The "text" contains Greek Unicode or it doesn't. Use the correct Font for the range of codes and it will display properly; otherwise not. That's it.
11 Jan 2018 by gokings
SEEKING ADVICE REGARDING CONVERSION TO UNICODEWHY I AM ADOPTING UNICODE SO LATE[Feel free to skip to "The Situation", below, but if you do, please don't flame me for "waiting so long".]I'm a former professional software engineer and programmer.I was "away" from programming for...
20 Nov 2014 by Gregory Morse
How to use uniscribe from VB.NET
9 Mar 2015 by Gregory Morse
Rendering Qur'anic (complex Arabic) scripts with Unicode in a PDF
1 Oct 2015 by hairy_hats
I've got an MFC project which is 20 years old and is still in daily use. While updating it to VS2015 I started getting warnings that MBCS is now deprecated and will be removed at some unspecified future date, so clearly Unicode Is The Future™.We've got thousands of saved files...
27 Dec 2012 by Hemant Singh Rautela
I have below code/////////////////////////////////////// byte[] bytestring= somefunction(); //somefunction() return a byte array.. string st1 = Encoding.UTF32.GetString(bytestring); byte[] bytestring2 = Encoding.UTF32.GetBytes(st1); bool st = bytestring2.Equals(bytestring);//...
2 Feb 2020 by honey the codewitch
Add UTF-32 support and easy foreach streaming to your apps
25 Oct 2011 by Hua Trung
Hi there ! i got a problem with my project about Unicode char ! plzz help me ! HtmlForm form = new HtmlForm(); string imagepath = Server.MapPath("img"); form.Controls.Add(GroupingGridView1); StringWriter sw = new StringWriter(); Response.ContentEncoding =...
3 May 2013 by i964682
use wchar_t instead of char for your buffer..
19 Apr 2013 by iDebD
Hi, I am trying to show a message box item as "اردو ویکیپیڈیا", this is a unicode character; I am using Delphi 7; but in the editor it is showing as ????? ?????, it is not supporting unicode;Can any one tell me what I need to do in the Delphi editor or project to make it unicode...
19 Sep 2019 by iDebD
Hi, I have a TStringGrid; When am writing in the grid, it is showing ????? ????? instead of showing و ویکیپیڈیا .The string which I am setting in TStringGrid is in Unicode, as if I can show it via messagebox;Following code setting unicode string:with frmhook.sg do begin if...
8 Sep 2013 by iDebD
I want to create a Library (Windows) with some API that can be easily loaded by any program and will help creating log files. I want my Library to be Supported both by Unicode and MBCS.Ex: Any unicode project can load this and use and send a unicode string to log it. Similarly any MBCS project...
14 Jan 2014 by ilostmyid2
hiin the following code:FILE *fp=fopen("f5.txt", "wt");LPCWSTR uctext=L"سلام";int stat=fputws(uctext,fp);fclose(fp);i get an empty file with stat=-1. why?! i expect fputws convert the unicode text which is in arabic language to multibyte string and write it to file.any idea?thx
12 Jul 2013 by JakirBB
I have written a program to read from a file. The file encoding is UTF-8 and content of the file is Japanese language. I have used 'wstring' to store the lines of the file. Now I want to save the file using SHIFT-JIS encoding. How can I do this using C++?