LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-07-2005, 02:36 AM   #1
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Rep: Reputation: 52
length of HTML names & addresses


On an international web site, what would be a suitable length for the following entries:
-First name or Christian name
-Second name or middle name
-Surname or last name
-Street and number
-Town or city
This is required for the CGI that will handle the results of the HTML form since the data cannot be truncated and the format of the file that will hold the data has to be decided accordingly.

The main concern is for example some Asian names are extremely long compared to Westen ones.
Is there anyone with this sort of experience who can provide advice?

Thank you for your help.
 
Old 08-07-2005, 03:03 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
What about using variable length strings in your file format ?
 
Old 08-07-2005, 05:37 AM   #3
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
This means reading the whole file when a member makes a change like a change of address. It also means if the new info supplied by the member is longer than the old one it won't fit and would have to be relocated.
We prefer simplicity over saving a bit of disk space.
 
Old 08-07-2005, 06:11 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
what file ?
You mean you haven't set a database or an ldap directory to store user's entries ?
 
Old 08-07-2005, 07:15 AM   #5
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
That is correct. It's not "users" I am talking about, it is "members" and it is not a database but a flat file but we're getting away from the subject. The choice between a database or a flat file was made a long time ago.
 
Old 08-07-2005, 07:27 AM   #6
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
.
 
Old 08-07-2005, 10:20 AM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
As a non native english speaker, I'm not going argue about semantics but I'm still quite sure these international site members are also this site's users ...

Anyway, it is certainly possible to have variable lenght names stored in flat files: CSVs, GEDCOM, XML and the likes do it easily, in fact fixed length data files is the exception.
The initial choice to have fixed lenght fields was a wrong design decision, and trying to figure out what other arbitrary maximum lenght is to be decided is probably still a wrong decision, unless you set an urealistic high mark (i.e. 256 characters for each field), which may hurts if your members count is in the million zone.
You may also need to set some string length limits in your CGIs to prevent buffer overflow attacks, depending on the back-end programming language.
 
Old 08-08-2005, 01:30 AM   #8
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,288

Original Poster
Rep: Reputation: 52
Pour quelqu'un dont la langue maternelle n'est pas l'anglais, votre anglais est parfait et vous n'auriez pas de difficultés a discuter les moindres détails.

Nous ne sommes pas une organisation commerciale et cela implique beaucoup de changements en ce qui concerne les coutumes de logiciels, parfois nous devons faire l'opposé de ce qui serait fait normalement.

Cependant, nous avons des difficultés a introduire un système de sécurité et il est possible qu'a la suite de cela, nous allons changer ce fichier en zones de longueur variables. Pas mal d'autres points doivent être discutés avant.

Ceci ne me fait pas abandonner mon idée de trouver, si possible, quelqu'un qui a de l'expérience en ce qui concerne ma question.

Je vous remercie pour vos commentaires qui sont définitivement valables et ne sont pas ignorés.
 
Old 08-08-2005, 02:08 AM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Your French is not bad too
Thanks !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configuring KDE - abbreviated file names length jetpeach Linux - Newbie 7 06-18-2005 11:02 PM
Long list of addresses & Calls when I log in wartstew Linux - General 0 02-09-2005 09:21 PM
Spam bots picking up e-mail addresses from HTML code? R00ts General 4 07-25-2004 03:24 PM
Configuring domain names on static IP addresses from SBC DSL redbasin Linux - Networking 4 02-10-2004 10:06 AM
iptables & mac addresses freelinuxcpp Linux - Security 2 12-31-2003 05:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration