预览模式: 普通 | 列表

mysql改变字符串的大小写转换

INITCAP:转换每个字的第一个字符为大写

LOWER:转换所有字符为小写
UPPER:转换所有字符为人写
 
 
 
eg:
 
LOWER(phone)

Tags: mysql

分类:技术文章 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 446

Vbscript Asp unicode编码转汉字

 自己写的代码:

ASP/Visual Basic代码
  1. Function unicodetostr(text)  
  2.     unicodetostr=text  
  3.     if instr(text,"&#")>0 then  
  4.         str=split(text,"&#")  
  5.         for i=1 to ubound(str)  
  6.         str1=mid(str(i),1,instr(str(i),";")-1)  
  7.         'response.write(str1&"<br/>")  
  8.         unicodetostr=replace(unicodetostr,"&#"&str1&";",chrw(str1))  
  9.         next  
  10.     end if  
  11. end function  

参考资料:https://zhidao.baidu.com/question/41686234.html

用Chr()函数把ascii码转化成汉字
用ChrW()函数把Unicode码转化成汉字
(还有之前说的AscW()函数返回值为负的时候,应加上65536 才得到汉字实际的Unicode码)
求汉字的Unicode代码 用AscW()函数
AscW("汉")=27721
求汉字的ASCII码 用Asc()函数 返回一个负数值
如Asc("汉")=-17734

Tags: asp vb

分类:技术文章 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 386

 广告位

↑返回顶部↑