Non-breaking space issue

Post any Bulk Rename Command support requirements here. Open to all registered users.

Non-breaking space issue

Postby Johnny27 » Sat Jun 23, 2018 10:52 pm

I still have one thing I can't get to work: Getting rid of a non-breaking-space in a file name. For some reason, the BRC Utility won't take it out no matter how I tell it what to look for. I've tried ASCII, HEX, OCT, HTML Number, and copy-and-paste but nothing works. In BRU, a copy-and-paste works fine, but I'd sure like to be able to compile all my change requests into one quick file to execute and clean up everything at once.

Any ideas appreciated. Love your utility by the way and thanks for providing it!!
Johnny27
 
Posts: 9
Joined: Sat Sep 02, 2017 10:55 pm

Re: Non-breaking space issue

Postby therube » Fri Jun 29, 2018 3:22 am

From a command line, for the /REPLACECI:, I typed in ALT+(numpad)0160 & that added the non-breaking space into the command line, which then renamed the last (that is the only file name there with an actual non-breaking space included in it) file as shown.

Code: Select all
C:\TMP>BRC32.EXE  /PATTERN:10* /REPLACECI: :CharlieXCX


Processing Folder C:\TMP\
Filename 10 kmh non-breaking space example.txt requires no changes
Filename 10 PM requires no changes
Filename 10hi.txt requires no changes
Filename 10áhi.txt would be renamed to 10CharlieXCXhi.txt


IOW, what looks like a space in here, /REPLACECI: :, is actually a non-breaking space (0x0160) entered into the command, using ALT-key method.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Non-breaking space issue

Postby Johnny27 » Fri Jun 29, 2018 6:27 pm

Thanks for the reply!! No luck. I had previously done the same with the leading and following periods in the file name. I tried it without the periods and still no luck. I'm on the verge of giving up since I think I've tried every combination available. :(

Thanks for the try!!
Johnny27
 
Posts: 9
Joined: Sat Sep 02, 2017 10:55 pm

Re: Non-breaking space issue

Postby therube » Fri Jun 29, 2018 8:00 pm

OS might make a difference?
I was able to easily create the "correct" filename, 10áhi.txt, on Win7.
XP is giving me something different.

That accented-a is hex FF (in Win7).
Though when I copy the name from the board here, & try to recreate it - on XP, even though it still looks like an accented-a, it is hex E1?

Seems a non-breaking space need not necessarily be FF (Alt+0160), as in it could be some other character that you are "seeing".

When typing into the command line, if you start with:
> BRC32.EXE /PATTERN:10* /REPLACECI::CharlieXCX
with the cursor set between the two colons,
then hold down the Alt+(numkey)0160,
then release the Alt key,
you should see the colons "space over", so it will look like,
> BRC32.EXE /PATTERN:10* /REPLACECI: :CharlieXCX
& what looks "blank" is actually your non-blanking space.

These 3 files were created under XP.
The two "NOT's" by pasting the name in, as copied from the forum here.
The one that actually works, that would actually be renamed, I created using the ALT+numkey method.
Code: Select all
Filename 10áhi, now this IS non-blanking space.txt would be renamed to 10CharlieXCXhi, now this
IS non-blanking space.txt
Filename 10ßhi-NOT.txt requires no changes
Filename 10ßhi-NOT2.txt requires no changes
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Non-breaking space issue

Postby Johnny27 » Fri Jun 29, 2018 8:41 pm

Again, thanks for the reply. I'm using Windows 10 Professional, so that may make a difference. I'm also using the 64-bit version of BRU - the latest version.

Code: Select all
D:\MagazineTest>RenameMags12a.bat

D:\MagazineTest>BRC64.exe /DIR:"D:\MagazineTest" /NODUP /IGNOREFILEX /NOFOLDERS /PATTERN:"*.pdf"   /REPLACECI:?á:- /EXECUTE

Processing Folder D:\MagazineTest\
Filename Bout.Helier.û.Current.Issue.pdf requires no changes
Filename Camp.Out.û.June.2018.pdf requires no changes
Filename Car-Talk.û.June.2018.pdf requires no changes
Filename Fellow.Group.û.June.2018.pdf requires no changes

D:\MagazineTest>


There is the info on what my current batch file inputs as well as the output. You can see that where the non-breaking space is, there is a U with the carrot on top. Of course I'm just confused still... :)
Johnny27
 
Posts: 9
Joined: Sat Sep 02, 2017 10:55 pm

Re: Non-breaking space issue

Postby Johnny27 » Fri Jun 29, 2018 8:43 pm

Again, thanks for the reply. I'm using Windows 10 Professional, so that may make a difference. I'm also using the 64-bit version of BRU - the latest version.

Code: Select all
D:\MagazineTest>RenameMags12a.bat

D:\MagazineTest>BRC64.exe /DIR:"D:\MagazineTest" /NODUP /IGNOREFILEX /NOFOLDERS /PATTERN:"*.pdf"   /REPLACECI:?á:- /EXECUTE

Processing Folder D:\MagazineTest\
Filename Bout.Helier.û.Current.Issue.pdf requires no changes
Filename Camp.Out.û.June.2018.pdf requires no changes
Filename Car-Talk.û.June.2018.pdf requires no changes
Filename Fellow.Group.û.June.2018.pdf requires no changes

D:\MagazineTest>


There is the info on what my current batch file inputs as well as the output. You can see that where the non-breaking space is, there is a U with the carrot on top. Of course I'm just confused still... :)
Johnny27
 
Posts: 9
Joined: Sat Sep 02, 2017 10:55 pm

Re: Non-breaking space issue

Postby therube » Sat Jun 30, 2018 1:01 am

Seems a non-breaking space need not necessarily be FF (Alt+0160), as in it could be some other character that you are "seeing".

So in your case, it appears (& sometimes what one "sees" may not be what it is), that your "character" (non-breaking space, or whatever you might want to call it) is "û" & that is Hex FB, which in "alt-key-code" (heh, whatever that is) is Alt+0251.

Point is, that you need to figure out what the correct character is that you want to replace.
In your case, from my end, from what I can make of it (& accepting that different OS, different utilities may see things differently), it seems that you'll want Alt+251.

Code: Select all
C:\TMP>BRC32.EXE  /PATTERN:C*  /REPLACECI:û:CharlieXCX

Processing Folder C:\TMP\
Filename Car-Talk.?.June.2018.pdf.txt would be renamed to Car-Talk.CharlieXCX.June.2018.pdf.txt

Not that the source filename echo'd back by BRC, at the command prompt, looks different that is posted in this forum, & different as seen in my file manager.
Nonetheless, the substitution appears to be correct.


I came up with the 0251 by copying the filename as you posted here & pasting that (the file name, from clipboard) into a hex editor, & examining the character in question.
And that showed as a Hex FB.
Then I went to a site like,http://www.codetable.net/hex/fb, & that shows me the "decimal equivalent", "&#251", which I figured could then be entered as Alt+(num-keys)0251.


& sometimes what one "sees" may not be what it is

What I pasted above, is not what I see upon running the command.

Image
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Non-breaking space issue

Postby Johnny27 » Sat Jun 30, 2018 8:51 pm

I had been down that route before. Tried it again using the Alt0251 but to no avail. In the batch file it showed the character û and not the "non-breaking space" or whatever it may be.

I'm now to the point that I'm giving up. I'll just continue to use the BRU and cut-and-paste the strange .(something). into it since it works that way.

I think you very much for your help here but am sorry to have taken so much of your time. :?
Johnny27
 
Posts: 9
Joined: Sat Sep 02, 2017 10:55 pm


Return to BRC Support