[ MAIN ]

Last Update: 2002/9/16

4D Tibetan Plug-in Package


4D Plug-in for handling Tibetan text in 4D database for Mac OS

This plug-in provides such functions:

      1. converting Tibetan script text to Wylie text and vice versa
      2. making search key from Tibetan script text
      3. making sort key of Tibetan text.

It supports only 4D for Mac OS on the Power PC Macintosh. I have tested it for 4D 6.5 and 4D 6.8.

It presupposes a knowledge of how to design and program 4D database application. If you are not familiar with this, please consult with an expert person or you can learn 4D programming from some resources (books, 4D documents and web sites).

Download

Reference

It consists of 4 procedures.

    1. Tibetan2Wylie ( InString; OutString ) returns status_code.
      • InString is a Text type parameter and receives a Tibetan script text which you want to convert into Wylie transcription text.
      • OutString is a Text type parameter and returns a converted Wylie string.
      • status_code is a Longint type result code and 0 means no error.

    2. TibSearchKey ( InString; OutString ) returns status_code.
      • InString is a Text type parameter and receives a target string from which you want to make a search key.
      • OutString is a Text type parameter and returns a string for search.
      • status_code is a Longint type result code and 0 means no error.

    3. TibSortKey ( InString; OutString ) returns status_code.
      • InString is a Text type parameter and receives a target string from which you want to make a sort key.
      • OutString is a Text type parameter and returns a string for sorting.
      • status_code is a Longint type result code and 0 means no error.

    4. Wylie2Tibetan ( InString; OutString ) returns status_code.
      • InString is a Text type parameter and receives a Wylie text which you want to convert into Tibetan script text.
      • OutString is a Text type parameter and returns a converted Tibetan text.
      • status_code is a Longint type result code and 0 means no error.

Sample code

You can set an object method of the Text type field in Tibetan script as follows:

  C_LONGINT($r)
  C_TEXT($result)

  Case of 
    \ (Form event=On Data Change )
      $r:=TibSearhKey ([Table1]Tibetan;$result)
      [Table1]SearchKey:=$result
      $r:=Tibetan2Wylie ([Table1]Tibetan;$result)
      [Table1]Wylie:=$result
      $r:=TibSortKey ([Table1]Tibetan;$result)
      [Table1]SortKey:=$result
  End case 

If you have any question or suggestion, please inform me of it.

Copyright: (c) 2002 Yoichi Fukuda. All rights reserved.