Garbled character?puppy 420 support utf-8?

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
User avatar
sasaqqdan
Posts: 39
Joined: Fri 06 Jun 2008, 13:56
Location: China,Zhejiang,Hangzhou
Contact:

Garbled character?puppy 420 support utf-8?

#1 Post by sasaqqdan »

1. patched init in initrd.gz:

Code: Select all

--- init-en	2009-03-28 06:53:29.000000000 +0800
+++ init-cn	2009-03-28 07:02:36.000000000 +0800
@@ -85,9 +85,7 @@
 }
 
 mntfunc() {
- if [ "`echo "$*" | grep 'ntfs'`" = "" ];then
-  mount $@
- else
+ if [ "`echo "$*" | grep 'ntfs'`" != "" ];then
   #screen out -o and -t options...
   MNTPRMS="`echo -n "$*" | tr '\t' ' ' | tr -s ' ' | tr ' ' '\n' | grep '^/' | tr '\n' ' '`"
   #v4.00 new ntfs-3g version...
@@ -104,6 +102,11 @@
   else
    ntfs-3g $MNTPRMS -o umask=0,no_def_opts,noatime,rw,force 2>/dev/null
   fi
+ elif [ "`echo "$*" | grep 'vfat'`" != "" ];then  
+  MNTPRMS="`echo -n "$*" | tr '\t' ' ' | tr -s ' ' | tr ' ' '\n' | grep '^/' | tr '\n' ' '`"  
+  mount $MNTPRMS -o noatime,utf8,quiet  
+ else
+  mount $@
  fi
  return $?
 }
@@ -1113,7 +1116,7 @@
   #find all the extra sfs files...
   touch /tmp/LOGONEBASES
   NPATTERN="_${PUPPYVERSION}\\.sfs"
-  ls -1 $SFSSDIR/*.sfs |
+  ls -1 $SFSSDIR/*.sfs ${PUPSFSDEVMNTPT}$(dirname $PUPSFSFILE)/*.sfs |
   while read ONEEXTRA
   do
    ONEBASE="`basename $ONEEXTRA`"
2.copy and cover ntfs-3g in initrd.gz

3.modify /usr/local/bin/drive_all:
old 170 line:

Code: Select all

    mount -t vfat -o shortname=mixed,quiet /dev/$ONEDRVNAME /mnt/$ONEDRVNAME #v411
new 170 line:(add utf8)

Code: Select all

    mount -t vfat -o shortname=mixed,quiet,utf8 /dev/$ONEDRVNAME /mnt/$ONEDRVNAME #v411
Attachments
ruanma.jpg
Chinese filename is Garbled character
(53.53 KiB) Downloaded 1638 times
Last edited by sasaqqdan on Sat 28 Mar 2009, 11:35, edited 3 times in total.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#2 Post by Dougal »

When you put text inside the "

Code: Select all

" brackets, other markup (bold, italic etc.) won't work, since it assumes it's part of the code...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#3 Post by Dougal »

Wow, I must be really losing my mind... I was sure you marked the "utf8" in your patch as bold...

Anyway, am I assuming correctly that your change will require nls_utf8 to be loaded in the init script?
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

do you have a chinese font installed?
The square characters indicate, that they are utf8, but that no matching font was found.

look here for chinese fonts:
http://www.murga-linux.com/puppy/viewtopic.php?t=33679

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
sasaqqdan
Posts: 39
Joined: Fri 06 Jun 2008, 13:56
Location: China,Zhejiang,Hangzhou
Contact:

#5 Post by sasaqqdan »

MU wrote:do you have a chinese font installed?
The square characters indicate, that they are utf8, but that no matching font was found.

look here for chinese fonts:
http://www.murga-linux.com/puppy/viewtopic.php?t=33679

Mark
thanks,but I have used chinese fonts.if pup_420.sfs is in fat or ntfs drive,chinese filename in rox will be Shown as Garbled character!
Attachments
baidu001.jpg
(41 KiB) Downloaded 1677 times

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

#6 Post by WhoDo »

sasaqqdan wrote:I have used chinese fonts.if pup_420.sfs is in fat or ntfs drive,chinese filename in rox will be Shown as Garbled character!
Install the latest non-prescott version of ntfs-3g from the ibiblio.org repository (Install on the desktop), reboot and try again. Please report your results.
[i]Actions speak louder than words ... and they usually work when words don't![/i]
SIP:whodo@proxy01.sipphone.com; whodo@realsip.com

User avatar
sasaqqdan
Posts: 39
Joined: Fri 06 Jun 2008, 13:56
Location: China,Zhejiang,Hangzhou
Contact:

#7 Post by sasaqqdan »

Thanks,WhoDo.
I make ntfs-3g from source code :

Code: Select all

./configure --enable-really-static 
make 
new2dir make install
The useful ntfs-3g'size is 669kb,not 32k.

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#8 Post by Dougal »

sasaqqdan wrote:The useful ntfs-3g'size is 669kb,not 32k.
That's just because you compile it statically against glibc...
Attached is a version compiled statically against uClibc. This is only intended for use in the initrd, obviously.
Last edited by Dougal on Sun 12 Apr 2009, 09:26, edited 1 time in total.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#9 Post by Dougal »

Dougal wrote:am I assuming correctly that your change will require nls_utf8 to be loaded in the init script?
Since noone bothered replying to that, I guess I better do it: yes. You need your kernel to have nls_utf8 either built-in or loaded by init, if you want to mount any partitions as utf8.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

Post Reply