Showing posts with label Khmer Unicode. Show all posts
Showing posts with label Khmer Unicode. Show all posts

Sunday, February 28, 2010

Khmer Unicode with Ireport 3.7.1 works fine with Kh fonts

Just quick configuration with Ireport 3.7.1 without detail here:
  1. Download ireport from http://jasperforge.org 3.7.1
  2. Install ireport 3.7.1
  3. Open ireport design
  4. Use blank design
  5. Go to ireport tool configuration: Tool --> Options --> Fonts and click install fonts
I install two fonts: Khmer OS System and Kh System

First tested with Khmer OS System font, found it's not display correctly, see screen shot:

Now I use font: Kh System, it displays correctly:
Printed the report into PDF format also work for me.

To configure, I just change the font name to JasperReports Properties (find in Options menu):

In my local PC, I have already installed the font (Kh System) so please consider to add also if above configuration not yet work for you.

As I'm not using iReport, just wanna to test with Khmer Unicode only.

Thanks for comment any idea to improve it.

Tested Package download here.

Tuesday, February 2, 2010

Flex 3.x working with Khmer Unicode ?

I start a topic now with Flex 3 not rendering well with Khmer Unicode.

If anyone has any idea, please share; I'll do after some test first.

Updated 10/02/2010:
Embaded font still not work in flex 3:

To continue more test and find.

Monday, July 13, 2009

SQL Server with Unicode / Khmer Unicode characters

To be notice MS SQL supports only UCS-2 encoding so do not have encoding with UTF-8 as we expected as MySQL or some other database server as well. This means that you can't use UTF-8 character encoding with Microsoft SQL Server:

Here after I type Khmer Unicode and execute the query, I got question marks instead of characters:

So if you need to store national characters in Microsoft SQL Server - please consider using a national character encoding (U+1780 to U+17FF in Unicode/ISO10646 for Khmer Unicode characters, for example). Change data types:
  • varchar to nvarchar
  • text to ntext
  • char to nchar
Here is the example since I created a table and insert data:
1. Create database (mtr_db) as normally (default setting)

2. Create table (tblunicode) with two fields (id/name) but
name - data type nvarchar(MAX)


3. Insert Khmer Unicode and execute we got it as we typed!
Good luck!

Sunday, June 21, 2009

Chuon Nat - Khmer Dictionary 2.0 with Unicode font


Let's try to distribute Khmer Dictionary to help all Khmer or people get to know Khmer language enjoy using our right dictionary than some dictionary that wrote wrong Khmer word...

Here, it is Chuon Nat Khmer Dictionary (Khmer to Khmer) 2.0 to download.
The dictionary using Khmer Unicode so please download Khmer Unicode 2.0.
The dictionary contains also the short explanation about Khmer Language Grammar.

Thanks to Buddhist Institute of Cambodia.

You can find other related page for Khmer Dictionary:
1. http://code.google.com/p/khmer-dictionary-tools/
2. http://www.budinst.gov.kh/?q=node/314

Friday, December 26, 2008

Khmer Unicode with Crystal Report in C# Application

I use VS2008 to test Khmer Unicode rendering in Crystal Report.

I. Prepare Crystal Report Render well in report design
First you have to make the crystal report in design time possible to write or view Khmer Unicode

1.1. Copy usp10.dll (version1.465.4001.0) to C:\Program Files\Business Objects\Common\2.8\bin


















1.2. Change fonts setting
in Crystal Report, at VS2008, create a crystal report and go to Crystal Reports --> Design --> Default Setting --> Go to Fonts Tab, change all element to Kh System

II. View Crystal Report with VS Crystal Report Viewer,
Khmer Unicode is not rendering well.
(Under research)

III. View Crystal Report with Crystal Report View
It's working very well for me to view Crystal Report with Khmer Unicode characters on form.
Here is the process...

3.1. On design time, add COM control of Crystal Report ActiveX Report Viewer Control of Business Objects; from my pc, it's a dll at: C:\Program Files\Business Objects\Common\2.8\bin\ crviewer.dll












3.2. Add Reference in the project of craxddrt.dll



















3.3. Create Crystal Report
and write some code in Khmer Unicode and save it to some where, my example in folder bin/Debug

3.4. Coding to call the report to view in the control:


CRAXDDRT.Application crxApp = new CRAXDDRT.Application();
CRAXDDRT.Report crxReport = new CRAXDDRT.Report();
crxReport = crxApp.OpenReport(Application.StartupPath
+ "/KhmerUnicodeTest.rpt", null);
this.axCrystalActiveXReportViewer1.ReportSource=crxReport;
this.axCrystalActiveXReportViewer1.ViewReport();

3.5. Here is the result display












DOWNLOAD: Sample Project: TestCrystalReportViewer

IV. View Crystal Report by export directly to PDF
It works very well, just have issue with font size.
We just call Crystal Report Object and then export it to disk, here is the coding:


private void btnPrintCrystal_Click(object sender, EventArgs e)
{
CrystalKhmerUnicode rptCrystal = new CrystalKhmerUnicode();
rptCrystal.SetParameterValue("txtReportTitle","Hello World");
rptCrystal.SetParameterValue("txtTitle", txtTitle.Text);
rptCrystal.SetParameterValue("txtArticle", txtArticle.Text);
rptCrystal.ExportToDisk(ExportFormatType.PortableDocFormat, "./KhmerUnicode.pdf");
MessageBox.Show("Now report exported to current folder: KhmerUnicode.pdf");
// Direct open pdf report
System.Diagnostics.Process.Start("./KhmerUnicode.pdf");
}

Enjoy,
Happy New Year 2009!
Metrey,

Thursday, December 25, 2008

Wanna to write Khmer Unicode on coding in VS2005 or VS2008?

In fact, I know many people should already know it but I suppose to post here that maybe help others to search for.

I want to write Khmer Unicode text in coding in Visual Studio 2005 or 2008, maybe need to assign value or declare parameter in Khmer etc. So we need to make the editor know Khmer Unicode first.

After your PC running well with Khmer Unicode, please follow this instruction to make it possible to write Khmer on your code:

In Visual Studio option: Tools --> Options --> at Environment, Fonts and Colors set font to: Kh System, then it works.

See screens:













Here, after change, what I can write:

Tuesday, December 23, 2008

Khmer Unicode works now with Adobe CS3

Very good news for us, Khmer, that we have now the fonts that work with Adobe CS3.
It's easy to configure as in fact, we just install new fonts from Khmer OS (I'm not sure yet where is the source of this font), but you can download here: Khmer Unicode Supported CS3.

There are fonts:
  • Kh-Battambang
  • Kh-Bokor
  • Kh-Content
  • Kh-Fasthand
  • Kh-Freehand
  • Kh-Kangrey
  • Kh-Koulen
  • Kh-KoulenL
  • Kh-Metal-Chrieng
  • Kh-Muol
  • Kh-Muol-Pali
  • Kh-Siemreap
  • Kh-System

The right font view as:
















See how to do it:

1. Install fonts: Start -> Control Panel -> Fonts -> Install New Fonts -> Select Kh fonts to install















2. On Adobe Photoshop CS3, select a Kh font (Ex: Kh System)
Here Example:












Note: any font name in group of Kh font will be Ok with CS3, these fonts also can use well with embedded for website without needed usp10.dll, I'll test it first.