编码表,双字节字符编码范围:
1. gbk (gb2312/gb18030)
x00-xff gbk双字节编码范围
x20-x7f ascii
xa1-xff 中文 gb2312
x80-xff 中文 gbk
2. utf-8 (unicode)
u4e00-u9fa5 (中文)
x3130-x318f (韩文
xac00-xd7a3 (韩文)
u0800-u4e00 (日文)
- <?
- $str = "中国";
- echo $str;
- echo "<hr>";
- //if (preg_match("/^[".chr(0xa1)."-".chr(0xff)."]+$/", $str)) { //只能在gb2312情况下使用
- if (preg_match("/^[x7f-xff]+$/", $str)) { //兼容gb2312,utf-8
- echo "正确输入";
- } else {
- echo "错误输入";
- }
- ?>
中文判断问题,其实有很多学问,底层的内部编码,涉及utf-8,gbk,gb13800的各种不同。曾经研究过如何区分一个字符是什么字符的问题,关联细节太多。
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » php 判断中英文字符
波比源码 » php 判断中英文字符
order levofloxacin 250mg online cheap order levaquin generic
purchase dutasteride pill purchase tamsulosin without prescription order ondansetron 8mg pill
spironolactone over the counter buy fluconazole 100mg without prescription order fluconazole 200mg pills
ampicillin usa order erythromycin online cheap buy erythromycin 500mg sale
order fildena 50mg generic order careprost for sale buy methocarbamol 500mg online
purchase suhagra pills estrace price estradiol pills
lamotrigine canada mebendazole over the counter order retin gel online
tadalis 20mg for sale buy diclofenac generic voltaren for sale online
indocin 50mg uk indomethacin 50mg cheap trimox us
tadalafil 20mg pills cialis india viagra brand
vrai cialis 5mg prix viagra 200mg comprimГ© sildenafil en ligne
order prednisone 40mg pills prednisone pill viagra uk
buy accutane 10mg sale stromectol canada stromectol coronavirus
ramipril ca buy irbesartan 300mg pill buy azelastine 10ml without prescription
catapres uk buy catapres for sale order tiotropium bromide 9mcg for sale
brand buspar phenytoin 100 mg sale oxybutynin 2.5mg pills
buy hytrin 5mg order hytrin 5mg pill azulfidine 500 mg for sale
purchase alendronate online order motrin 600mg generic buy pepcid pills
order prograf 1mg online order urso 300mg online cheap buy urso 150mg pills
generic imdur 20mg imdur 40mg us buy generic micardis
brand bupropion order bupropion pill cost seroquel 100mg
imuran cost order generic viagra 50mg genuine viagra
cialis pills Brand cialis sildenafil 50mg pills for men
order generic cialis 20mg symmetrel order symmetrel pills
order medroxyprogesterone 5mg order periactin pill order periactin for sale
generic modafinil 100mg canada online pharmacies ivermectin 12 mg
order fluvoxamine 50mg generic order glucotrol 10mg online buy glucotrol 10mg pill
order accutane 10mg online cheap order isotretinoin 10mg generic cost deltasone 20mg
buy azithromycin 250mg pill buy gabapentin 100mg without prescription cheap neurontin 100mg
cialis 40mg uk buy tadalafil pills clomipramine for sale
glycomet 500mg pills metformin cost real cialis sites
olanzapine sale order olanzapine 10mg pill diovan pills
norvasc 5mg without prescription norvasc generic cheap cialis online
clozapine 50mg canada dexamethasone 0,0,5 mg drug buy decadron 0,5 mg online cheap
viagra 200 mg order viagra 50mg for sale brand lisinopril 5mg
buy omeprazole generic buying essay online casinos
order metoprolol 100mg pills levitra 10mg oral vardenafil tablet
order levitra 20mg medrol 16 mg otc methylprednisolone over counter
buy aristocort online purchase desloratadine generic buy clarinex 5mg for sale
buy xenical 60mg pill purchase acyclovir sale buy zovirax 400mg
tadalafil 10mg over the counter tadalafil canada plavix for sale online
allopurinol online order zetia 10mg cost ezetimibe 10mg oral
methotrexate 10mg canada oral coumadin order reglan 10mg online cheap
domperidone for sale purchase domperidone generic order cyclobenzaprine 15mg online cheap
purchase baclofen pills buy ketorolac pills order toradol 10mg generic
buy imitrex avodart 0.5mg usa purchase dutasteride online cheap
flomax over the counter spironolactone cost oral spironolactone 25mg
buy cephalexin 250mg order erythromycin generic order generic erythromycin 500mg
order ceftin 250mg for sale order bimatoprost online cheap order generic robaxin