Re: Forms encoding

Mike Aubury <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAGAq4WFaSuusBhCOd7Mg0u8iBFcURQLYmQSRO7PLKeiO3fnf=A@mail.gmail.com>
I think you need to explicitly set a locale to match that of the database..

If you're using UTF8 - the data should be in UTF8 and the locale set to
UTF8 - and you need to use the A4GL_UI=TUI_wide.
If you're not using UTF8 - the data should not be utf8, the locale should
be set explicitly to non-UTF8 locale, and you use the normal A4GL_UI=TUI


Personally - I've had very little success with UTF8 in the forms because of
problems with ncurses - and it causes all sorts of complications when
you're using things like LENGTH and somevar[1,2] etc - so I would avoid it
completely if at all possible.



On 20 September 2013 09:50, Peter Müller <[email protected]> wrote:

> Hello,
>
> I hope somebody can help me.
>
> I don't get special characters (Ü É , umlauts) in forms.
>
> I have following setup:
>
> Debian 7
> IBM Informix Dynamic Server Version 11.50.UC7IE
> 4GL Compiler Version  1.2 Build Level  33
> Database Nls Info: NLS Capabilities and Attributes   en_US.819 Collating
> Sequence   en_US.819 CType
> No locale environment settings, should default all to UTF-8.
>
> A table like this:
>
> create table cl(name char(10));
> insert into cl values ("ÜÉ");
>
> A "listing" like this:
>
> =============================
> database test
>
> main
> define cr record like cl.*
>
> declare cur cursor for select * from cl
> foreach cur into cr.*
>    display cr.*
> end foreach
>
> end main
> -----------------------------
> Output:
>
> name
>
> ÜÉ
> =============================
>
>
> A form like this:
>
> =============================
> database formonly
>
> screen
> {
> [f10                       ]
> }
> end
> attributes
> f10 = formonly.nam;
> end
> =============================
>
> And a UI program like this:
>
> =============================
> database test
>
> main
> define cr record like cl.*
> define nam like cl.name
>
> declare cur cursor for select * from cl
> foreach cur into cr.*
>
> let nam=cr.name
> open form f from "b" display form f
>
> input by name nam without defaults
>
> end foreach
>
> end main
> -----------------------------
> Output:
> [[M-C~QM-CM-1M-C~IM-CM-)   ]
> =============================
>
> I'm not shure if the problem is the compiled program or the terminal
> emulator Putty@Windows.
>
> Thank you, Peter.
>
>
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>
>

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.