Re: encoding="utf-8" and formatted direct access
Thomas Koenig <email@example.com> wrote:
> How do utf-8 and formatted direct access for character go together?
> For "normal" char kinds, I would use inquire(iolength), but that
> length is likely to depend on the character data in question.
Do you really mean formatted direct access. That's a combination I've
almost never used myself. I'm even tempted to drop the "almost", as I
can't recall a single instance, but there might be oen somewhere that I
In any case, note that inquire(iolen) is specifically for *UN*formatted.
It is not guaranteed to have any particular relationship to the
requirements for a formatted file. The record length of a formatted file
is measured in units default characters. It makes no sense to use
inquire(iolen) for formatted records of default char; the correct answer
is provided much more simply by the len intrinsic.
I don't recall the details of utf-8, as I'm afraid that's not something
I've ever used directly. I was thinking it's characters were always 8
bits (thus the 8), but I'm certainly no expert on the matter.
In any case, the answer would presumably be to determine the maximum
size that the desired records could be, and then to divide this by the
size of a default character.
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain