From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao LU Subject: Re: Org Mobile Setting and file encoding Date: Wed, 24 Nov 2010 10:05:33 -0500 Message-ID: References: <20101123.203319.166721619.joost@snow.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1276664053==" Return-path: Received: from [140.186.70.92] (port=55271 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLGv1-0002ku-34 for emacs-orgmode@gnu.org; Wed, 24 Nov 2010 10:06:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLGux-0000IT-NG for emacs-orgmode@gnu.org; Wed, 24 Nov 2010 10:05:58 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:62330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLGux-0000I9-BZ for emacs-orgmode@gnu.org; Wed, 24 Nov 2010 10:05:55 -0500 Received: by fxm20 with SMTP id 20so9572857fxm.0 for ; Wed, 24 Nov 2010 07:05:54 -0800 (PST) In-Reply-To: <20101123.203319.166721619.joost@snow.nl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Joost Helberg Cc: emacs-orgmode@gnu.org --===============1276664053== Content-Type: multipart/alternative; boundary=20cf3054a5416182640495cdd38a --20cf3054a5416182640495cdd38a Content-Type: text/plain; charset=ISO-8859-1 Hi Joost, Thanks a lot, this helps, after I convert all the org files I have, then try Mobile org again, all the files could be decoded in MobileOrg now. Best, Chao On Tue, Nov 23, 2010 at 2:33 PM, Joost Helberg wrote: > Chao, > > whenever mobileorg fails loading the file and converting it into an > UTF8 string, the error message about encoding is presented. > > The cause of your problem can be many things: > - the file is incorrectly recognised as encrypted > - the file is incorrectly recognised as not-encrypted > - the encoding is not utf-8 and there are offending bytes > - the parsing of the index file fails somehow > > To make sure utf-8 is all you do, evaluate (in .emacs e.g.): > > (prefer-coding-system 'utf-8) > (set-default-coding-systems 'utf-8) > (set-terminal-coding-system 'utf-8) > (set-keyboard-coding-system 'utf-8) > (setq default-buffer-file-coding-system 'utf-8) > > Furthermore, make sure you try everything not encrypted. > > Also, this helped with me, don't run the latest git org-mode against > production release mobileorg. Somehow my mobileorg on iphone failed on > the first lines of the index file. mobileorg on Android didn't fail > however. > > Good luck! > > Joost Helberg > > >>>>> "Chao" == Chao LU writes: > > Subject: [Orgmode] Org Mobile Setting and file encoding > > From: Chao LU > > To: emacs-orgmode@gnu.org > > Date: Tue, 23 Nov 2010 12:54:49 -0500 > > > Dear list, > > > I'm trying to set up Mobile Org, but there's some problem, > > > All my org files are placed in in ~/My Dropbox/org/org, as following: > > ----- > > (defvar org-dir (concat Dropbox "/org") "org dir") > > (defvar org-source-dir (concat Dropbox "/org/org") "org source dir") > > (defvar pub-html-dir (concat Dropbox "/org/public_html") "html dir") > > (defvar org-mobile-dir (concat Dropbox "/MobileOrg") "org mobile dir") > > > Then I set Mobile Org like this: > > (setq org-mobile-directory org-source-dir) > > (setq org-mobile-force-id-on-agenda-items nil) > > (setq org-mobile-inbox-for-pull (concat org-source-dir "/mobile.org")) > > > After org-mobile-push command, the agenda is generated, but in Mobile > Org, > > it could not be opened, > > and the error message is bad file encoding, unable to detect file > encoding, > > please re-save this file using UTF-8. > > > So how could I figure out what the file encoding of my org files, and if > > not, how to convert them (there's quite a bit) to UTF-8, > > and in the future how to save the files automatically to UTF-8 with the > > Chinese support? > > > The coding system is really confusing, thanks a lot!! > > > Chao > > -- > Snow B.V. http://snow.nl > --20cf3054a5416182640495cdd38a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Joost,

Thanks a lot, this helps, after I convert all the org file= s I have, then try Mobile org again, all the files could be decoded in Mobi= leOrg now.

Best,

Chao

On Tu= e, Nov 23, 2010 at 2:33 PM, Joost Helberg <joost@snow.nl> wrote:
Chao,

whenever mobileorg fails loading the file and converting it into an
UTF8 string, the error message about encoding is presented.

The cause of your problem can be many things:
=A0- the file is incorrectly recognised as encrypted
=A0- the file is incorrectly recognised as not-encrypted
=A0- the encoding is not utf-8 and there are offending bytes
=A0- the parsing of the index file fails somehow

To make sure utf-8 is all you do, evaluate (in .emacs e.g.):

(prefer-coding-system =A0 =A0 =A0 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(setq default-buffer-file-coding-system 'utf-8)

Furthermore, make sure you try everything not encrypted.

Also, this helped with me, don't run the latest git org-mode against production release mobileorg. Somehow my mobileorg on iphone failed on
the first lines of the index file. mobileorg on Android didn't fail
however.

Good luck!

Joost Helberg

>>>>> "Chao" =3D=3D Chao LU <loochao@gmail.com> writes:
=A0> Subject: [Orgmode] Org Mobile Setting and file encoding
=A0> From: Chao LU <loochao@gmai= l.com>
=A0> To: emacs-orgmode@gnu.org<= /a>
=A0> Date: Tue, 23 Nov 2010 12:54:49 -0500

=A0> Dear list,

=A0> I'm trying to set up Mobile Org, but there's some problem,<= br>
=A0> All my org files are placed in in ~/My Dropbox/org/org, as followin= g:
=A0> -----
=A0> (defvar org-dir (concat Dropbox "/org") "org dir&quo= t;)
=A0> (defvar org-source-dir (concat Dropbox "/org/org") =A0&qu= ot;org source dir")
=A0> (defvar pub-html-dir (concat Dropbox "/org/public_html") = "html dir")
=A0> (defvar org-mobile-dir (concat Dropbox "/MobileOrg") &quo= t;org mobile dir")

=A0> Then I set Mobile Org like this:
=A0> (setq org-mobile-directory org-source-dir)
=A0> (setq org-mobile-force-id-on-agenda-items nil)
=A0> (setq org-mobile-inbox-for-pull (concat org-source-dir "/
mobile.org"))

=A0> After org-mobile-push command, the agenda is generated, but in Mobi= le Org,
=A0> it could not be opened,
=A0> and the error message is bad file encoding, unable to detect file e= ncoding,
=A0> please re-save this file using UTF-8.

=A0> So how could I figure out what the file encoding of my org files, a= nd if
=A0> not, how to convert them (there's quite a bit) to UTF-8,
=A0> and in the future how to save the files automatically to UTF-8 with= the
=A0> Chinese support?

=A0> The coding system is really confusing, thanks a lot!!

=A0> Chao

--
Snow B.V. =A0 =A0 =A0 =A0http:= //snow.nl

--20cf3054a5416182640495cdd38a-- --===============1276664053== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1276664053==--