Search found 470 matches

by Liviu
29 May 2014 20:59
Forum: DOS Batch Forum
Topic: USA Flag batch file
Replies: 28
Views: 7304

Re: USA Flag batch file

I use XP PRO 32bit. Can anyone with XP test this if it works? Confirmed here that it doesn't work in XP. Problem seems to be with the 'findstr' screen output. It probably has to do with Dave's note " most control characters and many extended ASCII characters display as dots on XP " at htt...
by Liviu
28 May 2014 19:19
Forum: DOS Batch Forum
Topic: Unicode to UTF-8
Replies: 3
Views: 1441

Re: Unicode to UTF-8

It's not entirely clear from the question what the source "Unicode" is. Assuming it's a UTF-16LE encoded text file with the proper BOM, then converting it to a UTF-8 text file can be done with a simple 'type' at the cmd prompt. The following works since at least XP - replace of course 'utf...
by Liviu
28 May 2014 01:02
Forum: DOS Batch Forum
Topic: [Updated] Patch for cmd.exe for windows xp for cp 65001
Replies: 29
Views: 11035

Re: [Updated] Patch for cmd.exe for windows xp for cp 65001

Right. That's exactly what makes it difficult in your scenario to run _another_ shell side-by-side, which in turn might call external batch files or other programs that, in turn, would issue %comspec% calls. For an example, see the edit I mentioned in http://www.dostips.com/forum/viewtopic.php?p=346...
by Liviu
27 May 2014 19:48
Forum: DOS Batch Forum
Topic: [Updated] Patch for cmd.exe for windows xp for cp 65001
Replies: 29
Views: 11035

Re: [Updated] Patch for cmd.exe for windows xp for cp 65001

Jason provides a nice solution for use the patched cmd.exe as default. [...] With that, edit comspec variable will be unnecessary. That works nicely if you want to make the patched cmd the default. Still, in order to be able to run _two_ different shells side by side - for example to test or compar...
by Liviu
24 May 2014 21:45
Forum: DOS Batch Forum
Topic: [Updated] Patch for cmd.exe for windows xp for cp 65001
Replies: 29
Views: 11035

Re: [Updated] Patch for cmd.exe for windows xp for cp 65001

What I meant by "either work or crash" was "for repeated runs under the same conditions - like, on the same machine". I don't really know the context, and my guess was that the original had the hModule hardcoded assuming the preferred load address, while the fix retrieved it with...
by Liviu
23 May 2014 19:39
Forum: DOS Batch Forum
Topic: [Updated] Patch for cmd.exe for windows xp for cp 65001
Replies: 29
Views: 11035

Re: [Updated] Patch for cmd.exe for windows xp for cp 65001

Thanks for the update. I don't see any change in functionality, but if I am understanding the bugfix right then it was a case of either work or crash, and the previous patch happened to work here. FWIW I updated my $ascU.cmd in the p.s. of http://www.dostips.com/forum/viewtopic.php?p=33667#p33667 to...
by Liviu
23 May 2014 00:50
Forum: DOS Batch Forum
Topic: Synthesizing Unicode strings in Windows 7 batch
Replies: 4
Views: 3748

Re: Synthesizing Unicode strings in Windows 7 batch

This code displays the UTF16 characters given as UTF32 codepoints Nicely done! (Just one nitpick, those LSS need actually be LEQ.) Complications related to xp and carlos' patched cmd make your code a bit difficult to follow, so here is my take on the U+ to UTF-8 conversion alone - which is purely n...
by Liviu
22 May 2014 23:58
Forum: DOS Batch Forum
Topic: Keep Original File Name When Renaming File Extension
Replies: 6
Views: 1919

Re: Keep Original File Name When Renaming File Extension

This will rename any extension that starts with .ps Off topic, yet can't help but notice that this would incidentally rename .ps1 files (usually associated in Windows with PowerShell) to .ps (PostScript). Yes, I realize that's exactly what's been asked, and guess it must make sense in some context ...
by Liviu
20 May 2014 23:34
Forum: DOS Batch Forum
Topic: Comments without increasing macro size
Replies: 31
Views: 10871

Re: Comments without increasing macro size

I prefer penpen's solution , so I can just use \n without any conditions. That's a nifty craft of penpen's, no argument there. But if you want to " just use \n without any conditions " then you have to append that '^<nul ' to the '\n' macro definition itself. I can't say I followed every ...
by Liviu
16 May 2014 15:20
Forum: DOS Batch Forum
Topic: self-compiled .net hybrids
Replies: 24
Views: 16647

Re: self-compiled .net hybrids

@npocmaka_ thanks for the link. I missed that, and as good as google may be, it's still not easy to locate prior work when the relevant keyword looks like "<# :" I edited my other post to include a reference to the older thread. is it possible to get command line arguments? Not directly, s...
by Liviu
15 May 2014 23:52
Forum: DOS Batch Forum
Topic: self-compiled .net hybrids
Replies: 24
Views: 16647

Re: self-compiled .net hybrids

An alternative approach is to use a powershell wrapper, which in turn can compile and run c#/vb/js .net code on the fly. There would be some overhead due to the wrapper, but the big overhead remains .net itself, anyway, with or without powershell in the picture. Advantage would be doing away with th...
by Liviu
15 May 2014 15:28
Forum: DOS Batch Forum
Topic: [Updated] Patch for cmd.exe for windows xp for cp 65001
Replies: 29
Views: 11035

Re: [Done] Patch for cmd.exe for windows xp for cp 65001

You seem to use the term "pipe" for what i call "piping", and to define "piping" as what i would call data encoding and data interpretation. If that is the case then we both are right. That's the case, indeed. I deliberately used " piping under codepage 65001 &quo...
by Liviu
15 May 2014 11:39
Forum: DOS Batch Forum
Topic: [Updated] Patch for cmd.exe for windows xp for cp 65001
Replies: 29
Views: 11035

Re: [Done] Patch for cmd.exe for windows xp for cp 65001

The pipe works properly: As carlos said it is the more command that causes problems "More" was just the simplest example to demonstrate the problem, but it's not the cause of the problem. Piping under codepage 65001 is broken more deeply than just "more". Here is an example in W...
by Liviu
15 May 2014 00:48
Forum: DOS Batch Forum
Topic: [Updated] Patch for cmd.exe for windows xp for cp 65001
Replies: 29
Views: 11035

Re: [Done] Patch for cmd.exe for windows xp for cp 65001

It cover all the codepages listed oficially, more 52936 [...] Maybe 52936 would be appear in the official list Agree with 52936. I'll take back the part about 50229 - it's obviously the first one checked and have the flags 0'd out, and I must have had a momentary blind spot. About, the problem usin...
by Liviu
14 May 2014 21:55
Forum: DOS Batch Forum
Topic: How to use Unicode Chars?
Replies: 4
Views: 2035

Re: How to use Unicode Chars?

Well, suppose that i wonted display/print a set of unicode character. I have choice to print on screen the characters from U+2500 to U+2600 ⋅ 1 - What is the best approach to do this? ⋅ 2 - I know that using ALT+num i can display a char. But I have seen that if i use ALT+0NUM th...