monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] utf8 vs. string (for args and other stuff)


From: Julio M. Merino Vidal
Subject: [Monotone-devel] utf8 vs. string (for args and other stuff)
Date: Sun, 15 Apr 2007 20:58:30 +0200

Hi,

As part of the help-rewrite branch, I'm modifying the command class and the related functions (defined in commands.hh). While I already have most of the "internal" work done (a rewrite of the class and algorithms), I'm now finding problems when integrating those changes into the public functions because of string/utf8 inconsistencies.

I see that some places in the code define the user's arguments (argv) as a vector<utf8>, whereas other places use vector<string>. Conversions between the two happen in several places, as if they were always convertible. Based on:

http://www.venge.net/mtn-wiki/I18nL10n

I assume the arguments fall into the first category, "user's display/ entry charset". What's the correct way to represent them? string? Should those vector<utf8> args instances be vector<string> instead? If not, why are there two different representations?

At last, consider the commands class defined in cmd.hh. All its fields are strings at the moment. If I understood it correctly, it's ok for desc() to return a string because it will be in the user's charset; however, could desc_ be stored internally as utf8 (because its contents come from monotone's untranslated source code)? Which could be the correct type for, e.g., the name field? utf8?

Thank you.

--
Julio M. Merino Vidal <address@hidden>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]