chinese filenames and renaming

zmemw16
Thu Nov 12, 2015 2:37 pm
how do you rename files named in a picture based font?
some can be changed, but most file names are not ‘valid’ in some way.

so any tips?

stephen


jcw
Thu Nov 12, 2015 9:36 pm
What OS? Linux? Maybe a mix of “?” and tab-completion?
On Mac, it should not be an issue, everything is UTF-8 enabled. Windows too, I’d assume.

zmemw16
Thu Nov 12, 2015 10:08 pm
braincell failure, sorry linux debian 8 upto date as of 4hrs ago
i normally use konsole

one of the problems is extracting the files and dir struct from rar archives
apropos yields some library functions for font conversion.

stephen


RogerClark
Thu Nov 12, 2015 11:41 pm
I thought perhaps you wanted to automatically rename into english or perhaps some other language.

I suspect it would be possible but you would need to write your own renaming program


zmemw16
Fri Nov 13, 2015 12:50 am
that sadly is what i’m beginning to conclude.
the nasty is renaming items and structure within an archive.
i’d be happy replacing chars with 0’s with a count on the end as a name, extension doesn’t seem to be encoded.
all i want is the circuit schematic.

the web site i got the files from is mentioned in another post, if you open the sub-directory by clicking on it, you can then
tick boxes to select multiple items. clicking on download generates a zip file containing those items.

any ideas for a Perl one liner? :D
off to have a look on cpan

stephen


RogerClark
Fri Nov 13, 2015 8:05 pm
all i want is the circuit schematic

If all you are looking for is one file, cant you just grep inside each file looking for the signature of a schematic file?

This can be done using find piped to grep

Normally binary format files contain some chars at the beginning that are common to their file format.

If you have an example of a schematic, you could open it in a hex editor and see if there is a signature to search for.

Then you can manually rename the single file you search finds


zmemw16
Fri Nov 13, 2015 8:38 pm
the file names are not recognized as file names, they are composed of picture chars.

i can’t rename them inside the rar as they’re not valid, same problem with extraction(xarchive), same using midnight commander.
on some i can rename/extract the file/directory, extract and they all list as 0 bytes.

i suspect it needs some kind person to repackage the archive renaming all files or at least directories to frednnnn:-)

once you get down to the project level directories, the structure below e.g. APP, src, inc, usr directories are ok.
i’ll have another go at extracting the lower levels later on.

stephen


RogerClark
Fri Nov 13, 2015 11:20 pm
What is are U running

zmemw16
Sat Nov 14, 2015 12:24 am
if that was ‘what are you using?’

Debian 8, upto date 3hrs, using file manager invokes xarchive which invokes i know not what;
and midnight commander invokes unrar, unzip etc as reqd.
srp


RogerClark
Sat Nov 14, 2015 12:26 am
Can you post it somewhere and I’ll try to extract it on WIndows

I have extracted other chinese zips which have unicode file name chars and its always been OK


zmemw16
Sat Nov 14, 2015 7:26 am
roger,
for the sub-dir link is massive, so easier is this link,

https://pan.baidu.com/s/1c0i0rJU

double click on the name to enter directory, if you then tick some of the check boxes and click download, it will send a rar or zip of the
selected items.

are you about to do this on a M$ operating system?
in which case, i suppose i should officially object to the fruit of the poisonous tree :D

it’s really annoying when i misplace my a4 notebook with its pinouts and connections info, it’ll be flat somewhere and under something; almost as much as knowing i was going to comment and forgetting about what…. is magic button for new and unread posts; much better!

stephen


RogerClark
Sat Nov 14, 2015 9:14 am
I cant see a direct link, it keeps asking me to download a dodgy exe

enif
Sat Nov 14, 2015 9:47 am
Stephen, I downloaded the Windows archive from your link and replaced the directory names into D1…D4. Here is the file list I got:
% ls -lR
.:
total 4
drwx------ 7 enif enif 4096 Nov 14 10:36 D1

./D1:
total 33164
-rw-r--r-- 1 enif enif 50 Sep 16 22:17 AppProperty.xml
-rw-r--r-- 1 enif enif 872728 Sep 16 23:31 AppUtil.dll
-rw-r--r-- 1 enif enif 481686 Sep 16 22:17 autobackup.ico
-rw-r--r-- 1 enif enif 369432 Sep 16 23:30 autoDiagnose.dll
-rw-r--r-- 1 enif enif 873240 Sep 16 23:30 autoDiagnoseUpdate.exe
drwx------ 3 enif enif 4096 Nov 14 10:38 AutoUpdate
-rw-r--r-- 1 enif enif 5789976 Sep 16 23:30 BaiduYunGuanjia.exe
-rw-r--r-- 1 enif enif 2378520 Sep 16 23:31 Basement.dll
-rw-r--r-- 1 enif enif 686360 Sep 16 23:30 BugReport.exe
-rw-r--r-- 1 enif enif 1529624 Sep 16 23:29 Bull120U.dll
-rw-r--r-- 1 enif enif 332056 Sep 16 23:31 channelpcsdk.dll
drwx------ 2 enif enif 4096 Nov 14 10:31 D2
drwx------ 2 enif enif 4096 Nov 14 10:31 D3
-rw-r--r-- 1 enif enif 1120 Sep 16 22:17 DuiEngine license.txt
-rw-r--r-- 1 enif enif 2084864 Sep 16 22:17 exiv2.dll
-rw-r--r-- 1 enif enif 250648 Sep 16 23:30 FileUpload.exe
-rw-r--r-- 1 enif enif 481686 Sep 16 22:17 guanjia_logo.ico
-rw-r--r-- 1 enif enif 127768 Sep 16 23:29 HelpUtility.exe
-rw-r--r-- 1 enif enif 4776728 Sep 16 23:32 kernel.dll
-rw-r--r-- 1 enif enif 860952 Sep 16 23:32 kernelUpdate.exe
-rw-r--r-- 1 enif enif 105472 Sep 16 22:17 libexpat.dll
-rw-r--r-- 1 enif enif 455328 Sep 16 22:17 msvcp120.dll
-rw-r--r-- 1 enif enif 970912 Sep 16 22:17 msvcr120.dll
-rw-r--r-- 1 enif enif 186648 Sep 16 23:31 npYunWebDetect.dll
-rw-r--r-- 1 enif enif 177152 Sep 16 23:32 resource.db
drwx------ 2 enif enif 4096 Nov 14 10:31 skin
drwx------ 2 enif enif 4096 Nov 14 10:31 sounds
-rw-r--r-- 1 enif enif 1752752 Sep 16 23:29 uninst.exe
-rw-r--r-- 1 enif enif 192 Sep 16 23:32 VersionInfo
-rw-r--r-- 1 enif enif 192 Sep 16 23:32 VersionInfo2
-rw-r--r-- 1 enif enif 1263896 Sep 16 23:29 xImage.dll
-rw-r--r-- 1 enif enif 991000 Sep 16 23:29 YunDb.dll
-rw-r--r-- 1 enif enif 1005336 Sep 16 23:30 YunDetectService.exe
-rw-r--r-- 1 enif enif 4456216 Sep 16 23:30 YunLogic.dll
-rw-r--r-- 1 enif enif 258328 Sep 16 23:29 YunShellExt64.dll
-rw-r--r-- 1 enif enif 218904 Sep 16 23:29 YunShellExt.dll
-rw-r--r-- 1 enif enif 25214 Sep 16 22:17 YunTorrentFile.ico
-rw-r--r-- 1 enif enif 90904 Sep 16 23:30 YunUtilityService.exe

./D1/AutoUpdate:
total 2136
-rw-r--r-- 1 enif enif 2017560 Sep 16 23:32 Autoupdate.exe
-rw-r--r-- 1 enif enif 153880 Sep 16 23:31 AutoUpdateUtil.dll
-rw-r--r-- 1 enif enif 159 Sep 16 22:17 config.ini
drwx------ 2 enif enif 4096 Nov 14 10:31 D4
-rw-r--r-- 1 enif enif 90 Sep 16 22:17 VersionInfo.xml

./D1/AutoUpdate/D4:
total 1400
-rw-r--r-- 1 enif enif 455328 Sep 16 22:17 msvcp120.dll
-rw-r--r-- 1 enif enif 970912 Sep 16 22:17 msvcr120.dll

./D1/D2:
total 4668
-rw-r--r-- 1 enif enif 4776728 Sep 16 23:32 kernel.dll

./D1/D3:
total 688
-rw-r--r-- 1 enif enif 672024 Nov 14 10:29 NsisInstallUI.dll
-rw-r--r-- 1 enif enif 4608 Nov 14 10:29 nsProcessW.dll
-rw-r--r-- 1 enif enif 75 Sep 16 22:17 SetupCfg.ini
-rw-r--r-- 1 enif enif 11264 Nov 14 10:29 System.dll
-rw-r--r-- 1 enif enif 90 Sep 16 22:17 VersionInfo.xml

./D1/skin:
total 3628
-rw-r--r-- 1 enif enif 3176960 Sep 16 23:32 default.db
-rw-r--r-- 1 enif enif 536070 Sep 16 23:25 duiengineskin.zip

./D1/sounds:
total 672
-rw-r--r-- 1 enif enif 39336 Sep 16 22:17 1.wav
-rw-r--r-- 1 enif enif 386844 Sep 16 22:17 2.wav
-rw-r--r-- 1 enif enif 129596 Sep 16 22:17 3.wav
-rw-r--r-- 1 enif enif 126764 Sep 16 22:17 4.wav


jcw
Sat Nov 14, 2015 9:48 am
Hover over the item, then you see an upload icon, after that you need to click on a second upload icon above it.
But… I’ve been trying to download that – it keeps resetting and restarting from scratch after a while for me.

enif
Sat Nov 14, 2015 10:51 am
I also get problems with the download of pack.zip stopping after about 600MB… :(

Edit: After many failed attempts to download the file (never more than 650MB of the 1.8GB total), I finally suspect that the problem is mainly a problem of a corrupt/incomplete ZIP file and less related to the chinese character file names… so I gave up :(


zmemw16
Sat Nov 14, 2015 3:36 pm
@enif
i think you got the wrong one, right idea:-)

i’m hopeful that what i’m after is in one the smaller files, could you try with those individually please? <15Mb? ones
less chance of failure.

i made the same mistake with the parent directory, 1.8GB zip; similarily failures mid download.
also for me the link seemed to behave differently on successive visits, maybe there’s some visit and/or download count limiting
going on.

if i hover on an item, iceweasel shows javascript(0) bottom left
on most visits i get a persistent each visit claim 2gb cloud space pop-up

many thanks to all for trying
btw are we having fun yet?

stephen


RogerClark
Sat Nov 14, 2015 7:23 pm
stephen

I tried again, but no matter what icon i clicked on, it served me up a dodgy exe.

Put the zip file on some public cloud sharing e.g. dropbox and perhaps we can help.


ahull
Sat Nov 14, 2015 9:15 pm
Hmm… I downloaded the zip, which is heavily broken, I then ran some Linux foo on the zip to fix it. I’ll upload the resulting file to a googledrive folder and share it once I have something. I’m not sure what all is in the zip, looks like some pretty random stuff including Chinese language copies of some of the STM documentation, but there are also some .rar files with info about the OLED display and the usual copy of the ST32F10X standard libs which seems to crop up everywhere. Proceed with caution once I’ve finish uploading, I haven’t checked any of the files for viruses or malware.

zmemw16
Sun Nov 15, 2015 12:45 am
@ahull
what linux foo magic please? for future reference.

i looked again at one i pulled, sub dir contained 2 rars with size, attempted copy to ~, resultant files both 0 size

found my notebooks, under some large plastic containers, they were cheap, got 2 sets of 2.
intending for ferric chloride usage at some point.

stephen


ahull
Sun Nov 15, 2015 11:20 am
Fixed Zip file is here… 597 MB (625,504,584 bytes)
md5sum 683179ae377d2cb2e385278914059c37

Linux foo to fix damaged zip files is…
zip -FF Corrupted.zip --out New.zip


jcw
Sun Nov 15, 2015 11:27 am
Thanks – a really fast & easy download now, but I’m not having much luck with it on Mac OSX.
The zip -FF command worked, but unzip after that generates four errors, first one is this:

error: cannot create -?+??–?/????-??? STM32F103RCT6 RBT6+???? 51 AVR ARM STM32+????/4??STM32_OLED_NRF(???ۦ??˦?-Ȧ?).rar

I’ll leave it to others with more zip-fu to figure this out and extract the nice bits…

PS. download and fixed files sizes I see here are as follows:
-rw-r--r--@ 1 jcw staff 625504584 Nov 15 12:22 4.zip
-rw------- 1 jcw staff 625505305 Nov 15 12:22 New.zip


ahull
Sun Nov 15, 2015 11:43 am
jcw wrote:Thanks – a really fast & easy download now, but I’m not having much luck with it on Mac OSX.
The zip -FF command worked, but unzip after that generates four errors, first one is this:

error: cannot create -?+??–?/????-??? STM32F103RCT6 RBT6+???? 51 AVR ARM STM32+????/4??STM32_OLED_NRF(???ۦ??˦?-Ȧ?).rar

I’ll leave it to others with more zip-fu to figure this out and extract the nice bits…

PS. download and fixed files sizes I see here are as follows:
-rw-r--r--@ 1 jcw staff 625504584 Nov 15 12:22 4.zip
-rw------- 1 jcw staff 625505305 Nov 15 12:22 New.zip


jcw
Sun Nov 15, 2015 12:16 pm
Ah, ok – looks like “unzip -j” did the trick for me (don’t create dirs, do a “flat” extraction).

Update – I can see what looks like various examples, but no schematics of the board AFAICT.


ahull
Sun Nov 15, 2015 12:31 pm
@jcw Try this version.

jcw
Sun Nov 15, 2015 12:40 pm
Got it – thx. I think it’s more or less the same?

ahull
Sun Nov 15, 2015 1:03 pm
Look for these two files, they appear to be the schematic of the OLED board and the STM board.

OLED_STM32原理图.pdf
and
STM32F103RC开发板原理图.PDF


jcw
Sun Nov 15, 2015 1:13 pm
Bingo!!! Ok, I’m attaching the schematics here, as this was the purpose of the whole exercise, I think.

jcw
Sun Nov 15, 2015 1:15 pm
One more, looks like the main one.

jcw
Sun Nov 15, 2015 1:32 pm
To put this into context – this is the board I was looking for, not sure the schematic actually matches it, though:

ahull
Sun Nov 15, 2015 1:51 pm
jcw wrote:To put this into context – this is the board I was looking for, not sure the schematic actually matches it, though:

zmemw16
Sun Nov 15, 2015 5:11 pm
@ahull & @jcw
To put this into context – this is the board I was looking for, not sure the schematic actually matches it, though:

funny you saying that:-) http://www.stm32duino.com/viewtopic.php?f=3&t=725

many thanks – linux bits have been noted and the pdf’s saved.

one more Q – how did/do you save it to your Google drive? I’ve made more use other peoples drives than my own.

i think i’ve a couple more of this board on order, i suppose the next thing should/would be best price found?
bit late for me though

stephen


ahull
Sun Nov 15, 2015 7:36 pm
zmemw16 wrote:@ahull & @jcw
To put this into context – this is the board I was looking for, not sure the schematic actually matches it, though:

funny you saying that:-) http://www.stm32duino.com/viewtopic.php?f=3&t=725

many thanks – linux bits have been noted and the pdf’s saved.


jcw
Sun Nov 15, 2015 7:59 pm
Another board with the F103RC is this one: http://www.ebay.com/itm/251740557791
Less features, but also looks nice for that category µC and a 5x7cm proto board fits really well on it:

RogerClark
Sun Nov 15, 2015 8:28 pm
I have one of those boards.

However the manufacturing quality on mine was very poor. And I had to resolder a load of things, including removing buttons, so it looks a bit of a mess now ;-(


jcw
Sun Nov 15, 2015 8:51 pm
Good to know… I haven’t tried anything with it yet.

BTW (and veering completely off-topic by now), I find all these boards with a pair of 2xN headers nearly impossible to remove.

I just made a similar board for the Nucleo series, with their 2×19 pins “Morpho” connectors on both sides.
Can’t imagine prototyping any serious circuit on top and pulling it off again without damaging something…
Must be even worse for the Discovery boards, with their pair of 2×25 headers.

Is everyone just using masses of jumper wires? How do you set up a project which may have to be moved around a bit?


RogerClark
Sun Nov 15, 2015 8:54 pm
The headers are not that hard to remove, you just need to heat each pin one at a time and then pull the pins out from the other side

Note. Dont hold the pin with pliers while heating, as it takes longer to heat up. Just rest the pliers next to the pin, then when its hot, close the pliers and pull the pin out

When you’ve got all the pins out, the plastic can be removed easily and you can use solder wick to clean / open the wholes again

I’ve done this on loads of boards


jcw
Sun Nov 15, 2015 9:00 pm
Oops, sorry – wrong wording on my end. I didn’t mean unsolder – I meant pulling the headers apart…

(Be gentle, non-native speaker on this end of the line 🙂


zmemw16
Sun Nov 15, 2015 9:04 pm
@ahull
ok, so i said a couple.

http://www.aliexpress.com/item/Small-sy … 59394.html

£28.45/5 =>£5.69 inc postage £1.44

@jcw
that ebay store explicitly states C&E(uk) is your problem :(
is it 15% or 20% on top – bit of a gamble – depends on declaration and their mood i suspect

even it not actually buying, its worth browsing to the bottom as they may have a link to resources.

my dad was a magpie on books and old hand tools, i seem to have updated the theme, was avr, now stm … :D

stephen


ahull
Sun Nov 15, 2015 9:10 pm
RogerClark wrote:The headers are not that hard to remove, you just need to heat each pin one at a time and then pull the pins out from the other side

Note. Dont hold the pin with pliers while heating, as it takes longer to heat up. Just rest the pliers next to the pin, then when its hot, close the pliers and pull the pin out

When you’ve got all the pins out, the plastic can be removed easily and you can use solder wick to clean / open the wholes again

I’ve done this on loads of boards


RogerClark
Sun Nov 15, 2015 9:11 pm
jcw wrote:Oops, sorry – wrong wording on my end. I didn’t mean unsolder – I meant pulling the headers apart…

(Be gentle, non-native speaker on this end of the line :)


fredbox
Mon Nov 16, 2015 6:06 am
jcw wrote:Is everyone just using masses of jumper wires? How do you set up a project which may have to be moved around a bit?

jcw
Mon Nov 16, 2015 10:22 am
Ah, that’s an idea (and brings back memories…).

mrburnette
Mon Nov 16, 2015 1:29 pm
jcw wrote:Ah, that’s an idea (and brings back memories…).

RogerClark
Mon Nov 16, 2015 8:25 pm
I use wirewrap wire sometimes, as its thin and you can melt the insulation easily to solder the wire.

But the price of a small reel from my local supplier is around $15, which is vastly overpriced compared with normal stranded wire.

I guess I should search for it in eBay or Aliexpress etc and perhaps also get the tool(s)


martinayotte
Mon Nov 16, 2015 9:59 pm
jcw wrote:Ah, that’s an idea (and brings back memories…).

zmemw16
Sun Nov 22, 2015 6:13 am
sometime in 1976-80 working in power supply test; one of the jobs was applying power to a backplane of pcb sockets that had been wired using point 2 point machines by forcing a clip onto a pin, friction stripping the wire and clamping the wire to the pin.
now some pins had a few connections stacked up and that created assorted shorts usually across the power lines, first resort was a 5v @100a psu; quite useful in clearing said shorts

some of the vdu’s had a wire wrapped backplane, that had the same problems, similar solution.

please find attached the result of the far eastern character saga,
23-11-15-00:41 added the SPI, NRF24L01 and OLED sources

stephen


Leave a Reply

Your email address will not be published. Required fields are marked *