Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two functions into one
Message
De
27/06/2006 12:12:33
 
 
À
27/06/2006 12:04:39
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01131998
Message ID:
01132067
Vues:
14
>But for a jpg you shouldn't do a conversion. IOW remove conversion from code. Just write it out with BinaryWriter (might do with text as well).
>PS:UnicodeEncoding was sample and you might use other encodings' GetString() method too. Unicode is 2 bytes per character.

Well, the goal of FileToStr() is to have a universal function that can send me the string equivalent of all kind of files. So, basically, if I do FileToStr("d:\Text.txt") or FileToStr("d:\Logo.jpg"), I need to have the string equivalent. This is why I ended up with FileToStr() and FileToStrBinary() in my framework.

As for VFP's FileToStr(), I read on West Wind board that this function cannot handle binary files and someone else over there ended up in the same situation as me, but from VFP that time. IAC, I did two methods to achieve the same. So, it seems VFP's FileToStr(), based from what I read, cannot accomplish that from one function as it can only work with text files.

However, if you can know how to accomplish a .NET FileToStr() method that would handle all kind of files, that would be appreciated.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform