function | Chinese Character | string
/*--obtains the first letter of Chinese character string--*/if exists (SELECT * from dbo.sysobjects WHERE id = object_id (N ' [dbo].[ FGETPY] and Xtype in (n ' FN ', n ' IF ', n ' TF '))Drop function [dbo].
1. In MySQL, we often sort a field query, but in Chinese sorting and search, the Chinese character sorting and search results are often wrong. This situation is present in many versions of MySQL.If this problem is not resolved, then MySQL will not
http://blog.csdn.net/zhanglong_longlong/article/details/46772571--can support 20,000 characters of large character set!CreatefunctionF_ch2py (@chn nchar (1)) returns char (1) asbeginDeclare@n intDeclare@c Char (1) Set @n= 63Select @n= @n +1,@c=
SETAnsi_nulls onGOSETQuoted_identifier onGOCREATE FUNCTION [dbo].[f_sys_getpy](@str NVARCHAR(4000))RETURNS NVARCHAR(4000) asBEGINDECLARE @word NCHAR(1),@PY NVARCHAR(4000)SET @PY="' while LEN(@str)>0BEGINSET @word=left(@str,1)SET @PY=@PY+( Case when
When working with MySQL, the data table uses the UTF8 character set, in which the Chinese cannot be sorted directly by pinyin.If the character encoding of a field name in the data table TBL is Latin1_swedish_ciSELECT * from ' TBL ' ORDER by Birary
Provides various official and user-released code examples and code reference. You are welcome to exchange and learn.
// Obtain the first letter of the fieldFunction getfirstchar ($ s0 ){$ Fchar = ord ($ s0 {0 });If ($ fchar> = ord ("A") and $ fchar $
Javascript uses a regular expression to match the same word as the first letter and the last letter. js expression
This example describes how to use a regular expression in JavaScript to match the same word as the last letter. Share it with you for
Recent projects using the Symfony framework, this framework for the operation of the database in this team using ORM to operate, to be honest, the development efficiency and efficiency of using ORM is not necessarily high, to the name of its entity
The project needs a choice of city name function, the specific data can be found on the website of the National Bureau of Statistics, there are many direct search, such as http://blog.jjonline.cn/phptech/172.html.The data is there, but how are
There is a need for a recent project to extract the first letter of each word in a massive Dictionary of Chinese and English (including arabic numerals 0-9:
Gannicus --> G
Free --> Z
2B --> E
Silly X --> SCopy codeThe Code is as follows:Private
Recent projects using the Symfony framework, this framework for the operation of the database in this team using ORM to operate, to be honest, the development efficiency and efficiency of using ORM is not necessarily high, to the name of its entity
Preface
This article mainly introduces about PHP to get the first letter of Chinese characters and sorting related content, because often when we do the project, there will be the need for the first alphabetical order, such as: The city of the
Php code for batch obtaining the first letter (Chinese characters, numbers, and English letters)
$ Mysql_server_name = '192. 0.0.1 '; // change it to your mysql database server.
$ Mysql_username = 'user';
This article mainly introduces the method of getting the first letter of Chinese pinyin in PHP program, the friends who are interested in the reference, hope to be helpful to everyone.
The code is as follows:
PHP gets Chinese characters Pinyin
/// /// Convert Chinese characters into the first letter in pinyin/// /// /// Private string ChineseCap (string ChineseStr){String Capstr = "";Byte [] ZW = new byte [2];Long ChineseStr_int;String CharStr, ChinaStr = "";For (int I = 0; I {CharStr =
Today, I saw a "C # Calculate Chinese pinyin code" on the Blog of yyf9989. I thought it was complicated to read the code. It mainly retrieves the position of the input Chinese characters in the array and returns the first letter. So I remembered
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.