SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get a File Type

    Anyone know of a way to return a File Type via SilkTest. Need to determine if a file is Ansi or UTF-8.

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  2. #2
    Senior Member
    Join Date
    Nov 1999
    Location
    Eagle, ID,USA
    Posts
    1,035
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get a File Type

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Does this relate to a question you posted in January?<HR></BLOCKQUOTE>
    Sort of. We have an another .ini file that is constantly being modified by our AUT. I have created a basic UTF-8 format of this file and placed it on the network in which I can copy down within TestPlanEnter(). I don't want to copy it down if the UTF-8 format of the file is already there due to not knowing it's existing state.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>If so, Silk 6.x supports a UTF-8 FILETYPE in the IniFileOpen command.<HR></BLOCKQUOTE>
    The FileType parameter only works when creating new files in the IniFileOpen function.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>A brute-force method of distinguishing between UTF and ANSI files 'might' be to open each file in UTF mode and test for an error in a do...except loop. (I don't know what'll you'll receive, if anything.)<HR></BLOCKQUOTE>
    I'm not sure how a do/except would help me in this situation. Under what circumstance would an exception occur?

    ------------------
    Have you ever noticed? Anybody going slower than you is an idiot, and anyone going faster than you is a maniac.

  3. #3
    Junior Member
    Join Date
    Mar 2002
    Location
    NY
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get a File Type

    Try MSWindows API.
    MSDN: "Unicode and Character Set Functions"

    ------------------

  4. #4
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get a File Type

    Tony,

    Does this relate to a question you posted in January? If so, Silk 6.x supports a UTF-8 FILETYPE in the IniFileOpen command.

    A brute-force method of distinguishing between UTF and ANSI files 'might' be to open each file in UTF mode and test for an error in a do...except loop. (I don't know what'll you'll receive, if anything.)

    The sites www.unicode.org or www.utf-8.com might be useful.


    John


    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:13 PM.

Copyright BetaSoft Inc.