473,395 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Cmenu, Text Interfaces, and UTF8

Hello.

I am new to Perl and having a lot of trouble finding a terminal based
menuing system. Here's what I'm trying to do...

I'm coding a web application to assist with Unix systems
administration for my company. I've already writting most of the
application in PHP, PostgreSQL, and backend scripts running in the
POSIX Shell.

As I'm challenging myself to learn Perl, I'd like to convert some of
the PHP/Shell to Perl and learn a bit while I go. The web-based stuff
hasn't been too hard. I am able to get mod_perl running and have been
using CGI.pm.

However, some features of this app. are really better suited in a
shell environment. I.e. a menu based terminal session for junior
admins, etc. My thoughts were to use a Java applet SSH window
embedded in the browser to sort of 'glue' the text based stuff with
the web based stuff.

In checking for a Perl module that handles text menus on CPAN, I found
Cmenu. After trying for a long time to compile Curses.pm on an HP-UX
11.00 platform, I finally threw up my hands and am now developing on
Linux (Redhat 9.0). Curses.pm was difficult to install there. I
finally found a patch hidden within a Mandrake source RPM and applied
it to the one from CPAN, and wa la, it worked.

So, now I have Cmenu compiled and ready to go on a Linux platform. I
set up a basic script using it and it dies. It appears that Cmenu
doesn't support UTF8 encoding.

Ugh. The saga continues. I find a quick fix, setting the LANG
environment variables to eng_US before running the script. However,
this is done outside the script.

Here's where I'm at now. Is there a way to set the environment
variable, LANG, i n a shell script before calling Cmenu? Something
like:

$ENV{'LANG'}='en_US';
use Cmenu;
print $ENV{'LANG'};

....returns "en_US" but still creates an error.

Second question: am I going about all of this the right way? Is there
a text user interface more modern and supported than Cmenu? Should I
just try and run everything through HTTP and forget the TUI? My
apologies for the long email, I'm learning a lot but feel I'm chasing
my own tail here and getting nowhere.

Thanks for any help.
Tom.
Jul 19 '05 #1
1 2560
sh***@lore.cc (shade) wrote in message news:<a8**************************@posting.google. com>...
$ENV{'LANG'}='en_US';
use Cmenu;
print $ENV{'LANG'};


use() is compile-time.

If you want $ENV{'LANG'}='en_US' to happen at compile time, before
Cmenu is loaded, you need to enclose the assignment in BEGIN{}.

This newsgroup does not exist (see FAQ). Please do not start threads
here.
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JJ | last post by:
Hi, I have a little, big, boring problem :) I have a utf8 txt file to import in a MySQL db, cause I must create a web-application in PHP for reading this information on-line. I have create...
40
by: Peter Row | last post by:
Hi all, Here is my problem: I have a SQL Server 2000 DB with various NVarChar, NText fields in its tables. For some stupid reason the data was inserted into these fields in UTF8 encoding. ...
4
by: H Lee | last post by:
Hi, I'm an XML newbie, and not sure if this is the appropriate newsgroup to post my question, so feel free to suggest other newgroups where I should post this message if this is the case. I'm...
0
by: paul | last post by:
Here is the setup to my problem. I created a menu item "ParPort" on the standard menu toobar that the MFC wizzard generates when you create an application. In the CMainFrame class I disable the...
2
by: chaoy | last post by:
Hi, I created a user control as my site header. The user control consists a custom control, cmenu. I have tried using table to center the cmenu, and no luck. The cmenu just uses top=xxx, and...
12
by: Adam J. Schaff | last post by:
I am writing a quick program to edit a binary file that contains file paths (amongst other things). If I look at the files in notepad, they look like: ...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
1
by: Server Applications | last post by:
Hello I am trying to build a system where I can full-text index documents with UTF8 or UTF16 data using Oracle Text. I am doing the filtering in a third-party component outside the database, so...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.