首页 | 本学科首页   官方微博 | 高级检索  
     

Web服务器端藏文字符串长度的近似算法
引用本文:杨成甫,贾彦民,吴健. Web服务器端藏文字符串长度的近似算法[J]. 计算机工程与设计, 2007, 28(5): 1173-1175
作者姓名:杨成甫  贾彦民  吴健
作者单位:中国科学院,研究生院,北京,100049;中国科学院,软件研究所,北京,100080
基金项目:国家高技术研究发展计划(863计划) , 中国科学院知识创新工程项目
摘    要:藏文属于拼音文字,她的书写规则与英语书写规则一样是从左向右,从上到下,但每个单词之间没有空格,只用音节符把每个单词给分隔开.根据藏文文法,藏文的换行只能发生在音节符、单垂符,双垂符与空格的后面.目前主流浏览器(如Firefox,Netscape等)都不能处理藏文的这一断行特性,所以这些浏览器无法正常显示藏文文本,如Firefox将整个一段没有空格文本当作一个单词,造成在屏幕的右边无法换行.结果是用户必须拖动鼠标来浏览整篇文章,给用户带来了很大的麻烦.又由于藏文中大部分的拼音字母的宽度是不同的,在编写HTML文档时候也无法根据藏文字符串的多少来决定字符串的长度.该算法将采用了一个粗略的方法得到一个字符串长度的近似值,再根据行宽的限制在字符串的适当的位置找到一个可断行点进行断行.虽然得到的是近似值,但是基本上解决了主流浏览器无法处理藏文排版的问题.

关 键 词:音素符  藏文  排版  网页设计  浏览器  Web服务器
文章编号:1000-7024(2007)05-1173-03
修稿时间:2006-02-28

Approximation algorithm of length of Tibetan text string on web server
YANG Cheng-fu,JIA Yan-min,WU Jian. Approximation algorithm of length of Tibetan text string on web server[J]. Computer Engineering and Design, 2007, 28(5): 1173-1175
Authors:YANG Cheng-fu  JIA Yan-min  WU Jian
Affiliation:1. Graduate School, Chinese Academy of Sciences, Beijing 100049, China; 2. Institute of Software, Chinese Academy of Sciences, Beijing 100080, China
Abstract:Tibetan is pinyin writing system.Its directionality that is the same as the english writing system's direction is left-to-right and top-to-bottom,but there are no spaces between two words and the mark of a word is syllabic sign(a special character).According to the Tibetan grammar,line feed is put after a syllabic sign,SHAD(1) and space characters.At present the mainstream web page browsers,such as Firefox,Netscape and etc,can not support the characteristic of Tibetan typesetting,so the Tibetan text is not normally displayed on these browsers,for example Firefox treats a Tibetan paragraph without spaces as a word.This makes a line so long that it's length exceeds the display's width limit.As result,it is not convenient for users to view the whole text by dragging the scroll bar.Because not all the character of Tibetan have the same width,it is impossible to calculate the length of Tibetan string by count the number of character in the string when authoring HTML document.This algorithm gets the approximate value of the Ti-betan,then finds a fit line break opportunity in the string according to the line width limit.The primal problem of Tibetan typesetting on web browsers is solved.
Keywords:phoneme symbol  Tibetan  typesetting  homepage design  browser  web server
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号