Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Foreign Languages > Italian Forum
Home Register FAQ Members List Search Today's Posts Mark Forums Read


db2000 text2unicode


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-25-2008, 06:45 PM
maXim's Avatar
Senior Member
 
Join Date: May 2007
Location: Florence, Italy
Posts: 129
Send a message via MSN to maXim
Post db2000 text2unicode

db2000 Text2Unicode

Quello che propongo questa volta non è un'applicazione scritta in Basic4PPC ma più avanti vedremo come sfruttare l'utility in oggetto anche con il nostro amato compilatore (solo per desktop).
Non so a voi ma al sottoscritto capita sempre più spesso, a causa dell'internazionalizzazione, di dover convertire alcuni file di testo nel formato ASCII esteso (UNICODE). Finché si tratta di operare manualmente anche il semplice Notepad di Windows (Blocco Note) è più che sufficiente per salvare il testo nel formato desiderato, ma quando il tutto viene prodotto all'interno di un programma e se ne richiede la sua trasformazione "al volo" la cosa si complica un pò. Per questo ho realizzato diversi classi e controlli ma poi, visto che utilizzo diversi ambienti di sviluppo, ho deciso di realizzare un'utility gestibile con qualsiasi compilatore che disponga della famosa funzione Shell, comunque l'utilizzo è molto semplice e si può eseguire la procedura anche da riga di comando:

Text2Unicode.exe [infile.txt] [outfile.uni]

Con Basic4PPC l'utilizzo tramite la funzione Shell è altrettanto semplice (si possono considerare gli esempi sottostanti validi anche per altri compilatori):

Shell("Text2Unicode.exe", "c:\txt\inifile.txt_d:\uni\outfile.uni")

Vi ricordo che nel caso in cui nei nomi dei percorsi o dei file vi siano contenuti degli spazi è necessario "racchiudere" le stringhe relative tra i doppi apici:

exeFile = "c:\utility\Text2Unicode.exe"
parameters = Chr(34) & "C:\txt\ini_file.txt" & Chr(34) & "_" & Chr(34) & "C:\txt\out_file.txt" & Chr(34)
Shell(exeFile, parameters)

Ovviamente l'utility è freeware e viene rilasciata così come è, pertanto la responsabilità di qualsiasi danno prodotto (diretto e/o indiretto) è da attribuirsi solo all'utilizzatore.

Fatto il commento di rito mi auguro che la suddetta utility sia di vostro gradimento, si accettano consigli ma farebbe anche piacere conoscere altre esperienze in merito.
Attached Files
File Type: zip Text2Unicode.zip (366.8 KB, 11 views)

Last edited by maXim : 03-07-2008 at 10:04 AM.
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 07:12 PM
giannimaione's Avatar
Senior Member
 
Join Date: Apr 2007
Location: Naples, Italy
Posts: 116
Send a message via Skype™ to giannimaione
Default

a caval donato non si guarda in bocca,
Attached Images
File Type: jpg maxim.JPG (18.2 KB, 11 views)
__________________
Gianni Maione
Reply With Quote
  #3 (permalink)  
Old 02-25-2008, 07:23 PM
maXim's Avatar
Senior Member
 
Join Date: May 2007
Location: Florence, Italy
Posts: 129
Send a message via MSN to maXim
Default

Ciao Gianni,

chiedo scusa ma ho pubblicato la versione di debug!

Ho rimediato (almeno credo): scarica nuovamente il file e fammi sapere...
Reply With Quote
  #4 (permalink)  
Old 02-25-2008, 07:49 PM
giannimaione's Avatar
Senior Member
 
Join Date: Apr 2007
Location: Naples, Italy
Posts: 116
Send a message via Skype™ to giannimaione
Thumbs up ok

bravo, stai migliorando

a proposito: come stai?! Meglio!!!! mi fa piacere
__________________
Gianni Maione
Reply With Quote
  #5 (permalink)  
Old 02-25-2008, 08:08 PM
maXim's Avatar
Senior Member
 
Join Date: May 2007
Location: Florence, Italy
Posts: 129
Send a message via MSN to maXim
Post

Ciao Gianni,

in che senso sto "migliorando"?

Per il resto si "regge" o almeno ci si prova!
Reply With Quote
  #6 (permalink)  
Old 03-08-2008, 03:38 PM
HTC HTC is offline
Newbie
 
Join Date: Mar 2008
Location: London
Posts: 9
Cool

Hi maXim,

All this is very interesting but copy and translate Your jobs in English forums, please.
Reply With Quote
  #7 (permalink)  
Old 03-08-2008, 03:56 PM
maXim's Avatar
Senior Member
 
Join Date: May 2007
Location: Florence, Italy
Posts: 129
Send a message via MSN to maXim
Unhappy

Hi HTC,

You are right but I don't know well the English...
Reply With Quote
  #8 (permalink)  
Old 03-09-2008, 03:44 AM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 422
Default

Hi HTC,

Whenever I'm in trouble, I use this for translation:
http://babelfish.altavista.com/

The returned result is not natural language, but
you will get a good picture.

Cheers
Robert
Reply With Quote
  #9 (permalink)  
Old 03-11-2008, 06:24 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

You can also use
http://translate.google.com/
it gives results that are quite correct...
__________________
PC: Laptop CoreDUo, Windows XP SP2 French
PPC: TyTN, WM5 French -> iPAQ 214 WM6 French (to diverge or not to diverge,...)
Reply With Quote
  #10 (permalink)  
Old 03-21-2008, 09:16 AM
klaus's Avatar
Basic4ppc Veteran
 
Join Date: Oct 2007
Location: Switzerland
Posts: 434
Awards Showcase
Competition Winner 
Total Awards: 1
Default

Hi folks,
I have translated a technical text for taximania from English to French.
I then wanted to know how good software translators are and have translated the text with both, Babel and Google, and translated back to English.
You can find the result of the exercise at
http://www.basic4ppc.com/forum/showt...0787#post10787

Best regards

Google translation to italiano.
Hi folks,
Ho tradotto un punto di vista tecnico per il testo taximania da inglese a francese.
Ho poi voluto sapere quanto è buono il software e sono traduttori hanno tradotto il testo con entrambi, Babele e Google, e di ritornare tradotto in inglese.
Potete trovare il risultato di esercizio al

Ciao tutti

Translation back to English
Hi folks,
I translated a technical point of view for taximania text from English to French.
Then I wanted to know how good the software and are translators have translated the text with both, Babil and Google, and translated back into English.
You can find the result of the exercise
__________________
Klaus
Switzerland

Last edited by klaus : 03-21-2008 at 09:22 AM.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
db2000 - vb Functions maXim Italian Forum 1 04-19-2008 01:11 PM
db2000 - INI maXim Italian Forum 13 03-10-2008 07:27 PM
db2000 - TXT2PDF maXim Italian Forum 7 02-28-2008 07:29 PM
db2000 - GPS(c) maXim Italian Forum 2 05-29-2007 06:10 AM
db2000 - RCC maXim Italian Forum 4 05-26-2007 08:32 AM


All times are GMT. The time now is 05:51 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0