PWB508 Developing International Applications Using PowerBuilder - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

PWB508 Developing International Applications Using PowerBuilder

Description:

The GUI/Doc translation will be done at this stage. Internationalization (I18N) ... Use one byte, such as English, most European languages. MBCS/DBCS/SBCS ... – PowerPoint PPT presentation

Number of Views:94
Avg rating:3.0/5.0
Slides: 23
Provided by: fellenm
Category:

less

Transcript and Presenter's Notes

Title: PWB508 Developing International Applications Using PowerBuilder


1
PWB508 Developing International Applications
Using PowerBuilder
Jinyou ZhuSenior Software Engineer
jyzhu_at_sybase.comAugust 8, 2003
Guo-Bi WuSenior Software Engineer
guo-bi.wu_at_sybase.com
2
Developing International Applications Using PB
Presentation Outline
  • Overview of Internationalization
  • Current status
  • PowerBuilder 9 for international application
    development
  • PowerBuilder 10 Unicode
  • Q A

3
Overview of Internationalization
Two phases for Internationalization
  • Localization (L10N)
  • The process in which software is customized for
    each language you want to support.
  • The GUI/Doc translation will be done at this
    stage.
  • Internationalization (I18N)
  • The process in which code is modified to be
    culturally independent.

4
Localization (L10N)
GUI Documentation
5
Internationalization (I18N)
Process generalization
  • Choose code page
  • Determine what character set to support. It is
    the mapping table of characters to their
    numerical value.
  • Different countries use different code pages.
  • Standard for Code Pages (ASCII, EBCDIC, JIS
    (Japanese standard), GB2312-80(Simplified Chinese
    standard), Big5 (Traditional Chinese standard),
    etc)
  • Choose locales
  • Determine the format for text, number, date,
    currency, etc.
  • Externalization of strings, icons and graphics
    with text.
  • Modifying all the text manipulation functions to
    be aware of the code page.
  • Numeric and Currency Formatting.
  • Date and Time Formatting
  • Collation (sorting order)
  • Cultural consideration
  • Icons pictures

6
Choose Code Pages
Choose Code Pages
  • MBCS/DBCS/SBCS
  • It will use the code page and systems locale for
    your application.
  • It is used in most applications currently.
  • Unicode
  • Unicode provides a unique number for every
    character, no matter what the platform, or
    language.
  • It is better and natural for international
    applications.

7
MBCS/DBCS/SBCS
What is MBCS ?
  • MBCS -- Multi bytes Character Set
  • Use multi-bytes to represent a character.
  • DBCS -- Double Character Set
  • Use double bytes to represent a character such as
    Chinese, Japanese.
  • SBCS -- Use one byte, such as English, most
    European languages
  • MBCS/DBCS/SBCS Features
  • MBCS/DBCS are compatible to SBCS
  • Use 1 byte to represent ASCII
  • Use 2 bytes to represent other characters such as
    Chinese, Japanese, Korean etc.

8
Unicode
What is Unicode ?
  • Unicode provides a unique number for every
    character, no matter what the platform, or
    language.
  • There are 2 sets of Unicode
  • UCS-2 use one 16bit unit (2 bytes) to represent
    a character. (up to 65535 characters)
  • UCS-4 use one 32bit unit (4 bytes) to represent
    a character. UCS-4 is a superset of UCS-2. It
    includes more characters.
  • There are 3 popular Unicode Transformation
    Formats
  • UTF-8 Use 1 to 4 bytes to represent one Unicode
    character. ASCII characters is the same as those
    in ASCII. To represent UCS-2, need 1 to 3 bytes.
    To represent UCS-4, needs 1-4 bytes.
  • UTF-16 Use 1 or 2 (for UCS-4) 16bit unit to
    represent one Unicode character.
  • UTF-32 Use 1 32bit unit to represent one Unicode
    character.

9
PB 9 for international application development
Features for international application development
  • PowerBuilder 9 is a DBCS system. It can process
    and display DBCS characters only.
  • PowerBuilder 9 support Unicode database
  • The multi-Language character can be stored in the
    Unicode database.
  • PowerBuilder 9 support some Multi-Language code
    pages
  • The database can support Multi-Language code
    pages such as CP850.
  • PowerBuilder 9 makes full use of your current
    locale
  • If your default locale support one language,
    PowerBuilder 9 can process/display the language.
  • Conversion
  • The conversion will be based on the default
    locale. When process the data, PowerBuilder 9
    will convert it to your current locale, then
    display them.

10
How Does it work in PowerBuilder 9 ? (2-tiers)
2-tier system
Database
Data Convert
DB Driver
PB internal
DBCS
UI/DW
Web Service
DBCS
WS Client
Localized OS
EJB/DB
EJB JDBC
Server
Client
11
How Does it work in PowerBuilder 9 ? (n-tiers)
3-tier system
App Server
Database
Component
DB Driver
PB internal
NVO
UTF8
DBCS
UI/DW
Convert
DBCS
Web Service
WS
UTF8
UTF
NVO
Localized OS
JDBC
DB
UNI
App Server
Client
12
An example Address Book
Sample database and table
  • There is a Unicode database, which support
    multi-languages
  • The structure and data of the table are

13
An example Address Book (cont)
Configurations and Tips
  • Tips
  • Because PowerBuilder 9 is a DBCS application
    running on a localized Operating system, it can
    only support the language(s), which your OS
    supports.
  • Because conversion from Unicode to the code page
    of your current locale will happen, you have to
    arrange your data (in database) carefully.
  • If you simply show all data in DW, some
    rows/columns will be garbage.

14
Develop international applications in
PowerBuilder 9
Problem
  • Issues
  • Extra effort on database and data manipulation
    (select and update).
  • Internationalization must be well planed and
    difficult to implement.
  • Cannot show Multi-Languages in a single form.
  • There were hundreds of different, sometimes
    unrelated, systems of encoding. The effort to add
    one more language support will be huge.

15
PowerBuilder 10
For International application development
  • Fully support Unicode
  • PowerBuilder 10 is Unicode enabled. It uses
    Unicode as its native code page for all
    components.
  • It can process multi-language data in one
    application and display them in a single form.

16
Why use Unicode ?
  • Unicode allows a program or website to be
    targeted for multiple platforms, languages and
    countries.
  • It defines codes for all characters used in all
    major languages written today.
  • It is able to encode multilingual text.
  • Unicode is the official way to implement ISO/IEC
    10646.
  • It has been adopted by many of the industry
    leaders.
  • It allows data transfer between different systems
    without corruption.

17
Benefits
Benefits
  • Unicode can handle text in any language or any
    combination of languages.
  • You can process and show characters in
    multi-language in the single form.
  • It is possible that one application fits for all
    languages.
  • Conversion is only necessary on incoming and
    outgoing data without corrupt.
  • No data lose when convert from any code page to
    Unicode.
  • It simplifies operations on text because there is
    no longer a need to keep track of what encoding
    scheme is being used.
  • Disadvantages
  • Because one character in Unicode take 2 bytes, it
    consume more memory.

18
PowerBuilder 10 New Features
New Features related to Unicode
  • Fully support Unicode.
  • New PBL format to cover multi-language support.
  • Migration tool to old PBL format to new one.
  • Export object to a Unicode file.
  • Import ANSI Unicode objects to PB10.
  • Support ANSI Unicode APIs form PBNI.
  • JSP will support ANSI, UTF8, and UTF16.
  • Read/write both ANSI and Unicode files in
    PowerScript.
  • Support Unicode non-Unicode database.

19
Example Demo
Demo
  • Use the same database and same example as above.

20
SDN Presents CodeXchange
Share PowerBuilder 9 Code and Tools
  • New SDN feature enables community collaboration
  • Download samples created by Sybase
  • Leverage contributions of others to exploit PBNI
    (i.e. PBNI CommonDialog, PBNI OLEObject
    utilities)
  • Contribute your own code or start your own
    collaborative project with input from other
    PowerBuilder experts
  • Any SDN member can participate
  • Log in using your MySybase account via SDN
  • Join the collaboration already underway
  • http//powerbuilder.codexchange.sybase.com or via
    SDN at www.sybase.com/developer
  • SDN CodeXchange at TechWave
  • Technology Boardwalk
  • Sybase Booth Theater

21
SDN Presents CodeXchange
A New Benefit for Sybase Developers
  • Forum for exchanging samples, tools, scripts,
    etc.
  • New features enable community collaboration
  • Download samples created by Sybase or external
    users
  • Leverage contributions of others to extend Sybase
    tools
  • Contribute code or start your own collaborative /
    open source project with input from other product
    experts
  • Any SDN member can participate
  • Log in using your MySybase account via SDN
  • Join the collaboration already underway
  • http//www.codexchange.sybase.com or via SDN at
    www.sybase.com/developer
  • Visit SDN in the Technology Boardwalk or the
    Sybase Booth Theater

22
Q A
  • Thank You
Write a Comment
User Comments (0)
About PowerShow.com