Delphi in a Unicode World Part II
Delphi in a Unicode World Part II: New RTL Features and
Classes to Support Unicode
By: Nick
Hodges
原文链接:http://dn.codegear.com/article/38498
Abstract: This article will cover the new features of the Tiburon
Runtime Library that will help handle Unicode strings.
//
Introduction
In Part I, we saw how
Unicode support is a huge benefit for Delphi developers by enabling
communication with all characters set in the Unicode universe. We saw the basics
of the UnicodeString type and how it will be used in Delphi
In Part II, we’ll look at some of the new features of the Delphi Runtime
Library that support Unicode and general string handling.
TCharacter Class
The Tiburon RTL includes a new class called TCharacter, which is found in the Character unit. It is a sealed class
that consists entirely of static class functions. Developers should not create
instances of TCharacter, but
rather merely call its static class methods directly. Those class functions do a
number of things, including:
Convert characters to upper or lower case
Determine whether a given character is of a certain type, i.e. is the
character a letter, a number, a punctuation mark, etc.
TCharacter uses the standards set forth by the Unicode consortium.
Developers can use the TCharacter class to do many things previously done
with sets of chars. For instance, this code:uses
Character;
begin
if MyChar in [‘a’...’z’, ‘A’...’Z’] then
begin
...
end;
end;
can be easily replaced with uses
Character;
begin
if TCharacter.IsLetter(MyChar) then
begin
...
end;
end;
The Character unit also
contains a number of standalone functions that wrap up the functionality of each
class function from TCharacter, so
if you prefer a simple function call, the above can be written as:uses
Character;
begin
if IsLetter(MyChar) then
begin
...
end;
end;
Thus the TCharacter class can
相关文档:
最近经常会模拟网页提交返回网页源码,然后获得网页中相应的元素,于是需要常常解析Html中相应的各种元素,网络是个好东西,搜索一番,就找到了
好几个Delphi版本的HtmlParser的类库,试着使用了几个,发现解析起来都不完整,或多或少的回出现一些问题!于是想到了如果界面上有一个浏
览器,我们可以通过WebBrowser的Docu ......
转自:http://www.52delphi.com/List.asp?ID=597&Page=1
核心提示:函数需要 uses Direct3D9,D3DX9; 偶然发现一个函数可以直接保存表面到文件1!所以修改了一下,函数为:...
procedure CaptureScreen(Const FileName: string);
var
BitsPerPixel: Byte;
pD3D: IDirect3D9;
pSurface: IDirect3DSurface9;
......
由于项目的需要,近期开始学习用delphi开发一个软电话控件。
以前接触过一些delphi开发方面的东西(当然都是些皮毛啦),但没接触过ocx控件的开发,在此把一些简单的东西记下来,一方面以后自己可以再学习,另一方面希望对刚刚学习delphi开发ocx控件的初学 ......
---
Delphi in a Unicode World Part I: What is Unicode, Why do you need
it, and How do you work with it in Delphi?
By: Nick
Hodges
原文链接:http://dn.codegear.com/article/38437
Abstract: This article discusses Unicode, how Delphi developers
can benefit from using Unicode, and ho ......