How do I use a Unicode table to print a Tibetan character - go

Here is the Unicode characters table for the Tibetan language,
https://en.m.wikipedia.org/wiki/Tibetan_(Unicode_block)
How to I use the codes in that chart in a fmt.Printf(mycode) statement, in order to print, say the Tibetan letter ཏ, which is located at line U+0F4x and column F of that unicode chart.
Do I have to write:
Fmt.Printf(“U+0F4xF”)
or something like that, or do I have to drop the “U” or the “U+“ ?

To print ཏ (U+0F4F TIBETAN LETTER TA) (or any other Unicode character), you can put the character directly into your string literal, use a \u0F4F escape, or use the correspoding rune (Unicode codepoint):
fmt.Printf("Direct: ཏ\n")
fmt.Printf("Escape: \u0F4F\n")
fmt.Printf("Rune: %c\n", rune(0x0F4F))
The Go blog has some details...

Related

Why is there no super or subscript "q" or "Q" characters defined in UTF-8?

The header says it all. I just would like to be able to write,
inline but I am stuck with eᵖᐟᵠ. Is there any way at all to achieve this simple thing?
There are superscript q and Q characters defined in Unicode version 14 (column CodePoint contains Unicode (U+hhhh) and UTF-8 bytes; column Description contains surrogates in parentheses):
Char CodePoint Description
---- --------- -----------
ꟴ {U+A7F4, 0xEA,0x9F,0xB4} MODIFIER LETTER CAPITAL Q
𐞥 {U+107A5, 0xF0,0x90,0x9E,0xA5} MODIFIER LETTER SMALL Q (0xd801,0xdfa5)
Appear in UnicodeData.txt as follows (the file was previously downloaded from there):
findstr "Q;Lm;" D:\Utils\CodePages\UnicodeData.txt
A7F4;MODIFIER LETTER CAPITAL Q;Lm;0;L;<super> 0051;;;;N;;;;;
107A5;MODIFIER LETTER SMALL Q;Lm;0;L;<super> 0071;;;;N;;;;;
You need to find a font containing glyph for Modifier Letter Small Q (maybe Last Resort font family?) Try my answer to another question How to determine if a Glyph can be displayed?

'%' express any characters, is there any special character for only one character?

In Oracle '%' stands for any characters in that position.
Example:
Select * from table where id like '%1'
This stands for anything behind the number 1 : XXXXXXXXXXXX1 99999999991.
Is there any other character to express only 1 character ?.
Example of what I mean: (im going to use ~ as that reserved character)
Select * from table where id like '~1'
In this case only 91, x1, X1... etc would enter the select, but XX1 woudn't as you only used one ~.
Select * from table where id like '~~~1'
xxx1, 9991, 8881, etc....
Hope I explained myself, english is not my native language.
Only one wildcard character is represented by underscore, _
You can refer to Oracle's LIKE condition documentation:
like_condition::=
In this syntax:
char1 is a character expression, such as a character column, called the search value.
char2 is a character expression, usually a literal, called the pattern.
esc_char is a character expression, usually a literal, called the escape character.
[...]
The pattern can contain special pattern-matching characters:
An underscore (_) in the pattern matches exactly one character (as opposed to one byte in a multibyte character set) in the value.
A percent sign (%) in the pattern can match zero or more characters (as opposed to bytes in a multibyte character set) in the value. The pattern '%' cannot match a null.
Use an _ underscore.

Creation of file-format in Snow-flake

I am new to SF. I have a typical problem that I have faced while loading some data. The delimiter is part of extended ascii. It does not come in 0-127. We use thorn (ascii - 254) as delimiter. My Qn is while specifying the delimiter can I give the ascii code of that delimiter instead of actual character (44 instead of comma, 9 instead of tab etc)
Thanks in advance
You can specify the hex/octal code of any valid Unicode delimiter in the FIELD_DELIMITER option of the File Format. From the documentation:
The specified delimiter must be a valid UTF-8 character and not a random sequence of bytes.
For example, for fields delimited by the thorn (Þ) character, specify the octal (\336) or hex (0xDE) value. Also accepts a value of NONE.

Custom Search and Replace in Notepad++

I need to replace certain UTF8 hex codes to the equivalent character in an irregular text string like:
\C3\A1 á
\C3\A9 é
\C3\AD í
\C3\B3 ó
\C3\BA ú
I'm not sure if I should be using RegEx or a macro to find and replace each entry since they won't appear regularly in the text strings I'm working with.
Thanks.
Just a macro - as there's no "variable" data in your search, you don't need a regex. Record a macro to replace the first character, then the second and so on. Use the "normal mode" to replace with the correct character.
You need a reasonably new version of N++ to be able to record search & replace actions - from 5.8.2/3 I think.
Dave.

Double Quotes in ASCII

What is the ASCII number for the double quote? (")
Also, is there a link to a list anywhere?
Finally, how do you enter it in the C family (esp. C#)
The ASCII code for the quotation mark is 34.
There are plenty of ASCII tables on the web. Note that some describe the standard 7-bit ASCII code, while others describe various 8-bit extensions that are super-sets of ASCII.
To put quotation marks in a string, you escape it using a backslash:
string msg = "Let's just call it a \"duck\" and be done with it.";
To put a quotation mark in a character literal, you don't need to escape it:
char quotationMark = '"';
Note: Strings and characters in C# are not ASCII, they are Unicode. As Unicode is a superset of ASCII the codes are still usable though. You would need a Unicode character table to look up some characters, but an ASCII table works fine for the most common characters.
It's 34. And you can find a list on Wikipedia.
yes, the answer the 34
In order to find the ascii value for special character and other alpha character I'm writing here small vbscript. In a note pad, write the below script save as abc.vbs(any name with extention .vbs) double click on the file to execute and you can see double quotes for 34.
For i=0 to 150
msgbox i&"="&char(i)
next
you are never going to need only 1 quote, right?
so I declare a CHAR variable i.e
char DoubleQuote;
then drop in a double quote
Convert.ToChar(34);
so use the variable DoubleQuote where you need it
works in SQL to generate dynamic SQL but there you need
DECLARE #SingleQuote CHAR(1)
and
SET #SingleQuote=CHAR(39)

Resources