ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alexandre Krispin <k.m.alexandre@gmail.com>
To: news3@nililand.de, mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Error while compiling : ! String contains an invalid utf-8 sequence.
Date: Sat, 26 Nov 2011 11:44:39 +0100	[thread overview]
Message-ID: <CAA5sP+8gij9cKfuLUmuz6qm0L5WSO0d902V5BnDYZ4kw9hDc1A@mail.gmail.com> (raw)
In-Reply-To: <9ih3vujj7qa3$.dlg@nililand.de>


[-- Attachment #1.1: Type: text/plain, Size: 7901 bytes --]

Thanks Ulrike ! It seems the 2 messages I sent yesterday have been lost (I
have received a mail which might point out a delivery failure from the
mailing list) though it is written I don't need to send again the message,
in case, here is the copy of mails I sent. Now the only problem remaining
is that japanese sentences are not wrapped (long titles of books go through
the page). And though I took a look to documentation about chinese, I don't
know what I am missing.

*******************************************Beginning of first
mail********************************************************

Hello,

Thanks to all for your answers !

Finally, thanks to an article dealing about Xelatex, bibtex files and utf-8
problem (see
http://skalldan.wordpress.com/2011/08/01/%E3%82%A4%E3%83%B3%E3%83%89%E5%AD%A6%E4%BB%8F%E6%95%99%E5%AD%A6%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8B-utf-8-%E3%81%AB%E3%82%88%E3%82%8B-tex-%E6%96%87%E6%9B%B8%E4%BD%9C%E6%88%90-4/)
I got the idea how to solve my problem.

In the bib file I have surrounded all japanese words by {\jpn }, like in
this minimal example :
%%%%%%%%%beginning of the example%%%%%%%%%%%
@article{uzawa2011tpp,
author = "Hirofumi Uzawa {\jpn 宇沢弘文}, Uchihashi Katsuto {\jpn 内橋克人}",
journal = "Sekai {\jpn 世界}",

title = "Taidan TPP wa shakaiteki kyôtsû shihon wo hakai suru

{\jpn 対談TPPは社会的共通資本を破壊する}",

year = 2011,
month = "april",

publisher = "Iwanami shoten {\jpn 岩波書店}",

pages = "62-72",
url = "http://ci.nii.ac.jp/naid/40018706510/",

note = "test"
}
%%%%%%%%%%%%end of file%%%%%%%%%%%%%%

Then, thanks to the documentation for simplefonts I have introduced a
typeface definition, like in this minimal example :

%%%%%%%%%%beginning of file%%%%%%%%%%%%%
\usemodule[simplefonts]
\setmainfont[Arno Pro]
\definesimplefonttypeface[jpn]
[hiraginokakugothicpro]

\enableregime[utf8]

\setupbibtex[database=biblio]

\starttext

test
\completepublications[criterium=all]
{\jpn 知らない  金 11月 25, 2011  10:21午後}
\stoptext

%%%%%%%%%%end of file%%%%%%%%%%%%%%%

And everything works well when compiling the whole with "context *tex".

The only question remaining in my mind is : is there another way ? Just out
of curiosity, since Hans Hagen mentioned "Thomas" who use greek.

*******************************************End of first
mail********************************************************

And the second mail :

*******************************************Beginning of second
mail********************************************************
Now that japanese display correctly, there is still another problem.
Japanese sentences (long titles in bibliography) don't break at the end of
line. I have tested the behavior of japanese with entire paragraphs, and I
get the same problem as in the bibliography, lines don't break and go
"through" the page.

Though I have looked to documentation about chinese on the wiki, none
helped me to solve this problem. Does someone have any idea ?

Here is a minimal example with a paragraph sample in japanese :
%%%%%%%%%beginning of file%%%%%%%%%%
\usemodule[simplefonts]
\setmainfont[HeiseiMinStd-W3]
\definesimplefonttypeface[jpn]
[HeiseiMinStd-W3]
\setupbodyfont[12pt]
\setuptolerance[\v!verytolerant,\v!stretch]
\enableregime[utf]

\usemodule[typearea]
\setupTypeArea[bcor=30mm,alphabets=2.6,oneside]
%*********************************
\starttext

そしてディズニー原理主義で考えた場合、「一秒24コマの絵」で作るフルアニメが至上。そのルールに照らした場合、「電脳コイル」より「らき☆すた(ハルヒ)」の方が優れている。
ニョロニョロと滑らかに動く。つまりそれだけ動画枚数を多く使ってる。よりフルアニメに近い。よって「電脳コイル<らき☆すた」となる。

コレに作画マニアは反論する。アニメは「アニメーターのスキル」こそが最も重要。「スキル>作画枚数」、だから優れたアニメーターである磯光雄の手掛けた電脳コイルのほうが偉い。
じゃあ磯光雄がフルアニメにしたら?今の2コマ3コマ打ちの磯光雄より偉いの?より優れてるの?

>フルアニメの磯光雄の方が優れている。
この場合、「リミテッドアニメという制約の中で独自の進化をした日本アニメのアイデンティティ」というのが無くなってしまう。「らき☆すた」には勝てるがファンタジアには負ける。
>2、3コマ打ちのリミテッドの磯光雄の方が優れている。
質としては等価(磯光雄の原画)でより量のあるフルアニメよりもリミテッドアニメの方が優れてる、その理由を言語化する必要がある。

じゃあ、そのリミテッドで手に入れた価値とは何?
例えば「フルアニメと同じ価値をリミテッド(より少ない動画枚数=コスト)で作れるという『省エネ』の部分にある」ってこと?ソレだと新たな創作的価値を別に産み出してないよね。
そうでないのなら動きの質がディズニーとはどう違うの?
\stoptext
%%%%%%%%%end of file%%%%%%%%%%%%%

I attach the corresponding pdf file I obtain after compilation.

*******************************************End of second
mail********************************************************


2011/11/26 Ulrike Fischer <news3@nililand.de>

> Am Fri, 25 Nov 2011 19:50:52 +0100 schrieb Alexandre Krispin:
>
> > Hello,
> >
> > I am trying to get japanese displayed in bibliography. But I get the
> error
> > "! String contains an invalid utf-8 sequence." while compiling with the
> > command "context *tex".
>
> > And here is the bib file :
> >
> > %%%%%%%%%%%%%%%beginning of file%%%%%%%
> > @article{uzawa2011tpp,
> > author = "Hirofumi Uzawa 宇沢弘文, Uchihashi Katsuto 内橋克人",
> > journal = "Sekai 世界",
> > title = "Taidan TPP wa shakaiteki kyôtsû shihon wo hakai suru
> > 対談TPPは社会的共通資本を破壊する",
> > year = 2011,
> > month = "april",
> > publisher = "Iwanami shoten 岩波書店",
> > pages = "62-72",
> > url = "http://ci.nii.ac.jp/naid/40018706510/",
> > }
> > %%%%%%%%%%%%%%%end of file%%%%%%%%%%
> >
> > Do someone know how to get ride of utf-8 errors ? Or is this a problem
> with
> > bibtex,
>
> Yes. bibtex is an 8-bit application. Your japanese characters
> consist of three or four 8-bit-blocks. As bibtex has no knowledge
> that these blocks should be keeped together it can happen that
> bibtex breaks them in pieces e.g. at line ends and so you end with
> invalid utf8. You could try to move the blocks a bit around e.g.
> with braces or spaces so that bibtex finds a break point between the
> utf8-chars and not in the middle of one of them.
>
>
> > and then should I use anything else to replace it ?
> > (does something like Biber work ?)
>
> Well in latex with biblatex it works and is the recommended
> solution. But I don't know if context supports biber.
>
>
> --
> Ulrike Fischer
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>



-- 
------------------------------------------------------------------------------
Alexandre KRISPIN
41 rue Guynemer  |  93200 Saint-Denis  |  France
tél : 06 28 76 69 34  |  http://bijutsu.toile-libre.org
----------------------------------------------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 9875 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2011-11-26 10:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-25 18:50 Alexandre Krispin
2011-11-25 19:03 ` Christian
2011-11-25 20:09   ` Hans Hagen
2011-11-25 22:13     ` Alexandre Krispin
2011-11-25 23:56     ` Alexandre Krispin
2011-11-27 13:33       ` Mojca Miklavec
2011-11-27 16:13         ` Alexandre Krispin
2011-11-28  9:20       ` Wolfgang Schuster
2011-12-07  8:28     ` Thomas A. Schmitz
2011-12-07 16:37       ` Alexandre Krispin
2011-12-07 17:45         ` Hans Hagen
2011-11-26  9:35 ` Ulrike Fischer
2011-11-26 10:44   ` Alexandre Krispin [this message]
2011-11-26 11:39     ` Wolfgang Schuster
2011-11-26 11:41       ` Alexandre Krispin
     [not found] <mailman.901.1322405047.4232.ntg-context@ntg.nl>
2011-11-28  7:08 ` S Barmeier
2011-11-28  8:42   ` Alexandre Krispin
2011-11-30 12:25     ` Alexandre Krispin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA5sP+8gij9cKfuLUmuz6qm0L5WSO0d902V5BnDYZ4kw9hDc1A@mail.gmail.com \
    --to=k.m.alexandre@gmail.com \
    --cc=news3@nililand.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).