This question is not answered.


Permlink Replies: 94 - Pages: 7 [ Previous | 1 2 3 4 5 6 7 | Next ] - Last Post: 31-Oct-2017 17:26 Last Post By: AndreWolff Threads: [ Previous | Next ]
jGromit

Posts: 33,185
Registered: 31-Jan-2006
Re: jAlbum 14 mutilates Lightroom comments
Posted: 25-Jul-2017 18:46   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
How can I fetch these strings?

One example:
String thisValue = meta.get("Iptc.Copyright Notice");
All metadata fields work the same way.
AndreWolff

Posts: 2,141
Registered: 14-Dec-2007
Re: jAlbum 14 mutilates Lightroom comments
Posted: 25-Jul-2017 18:59   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
I tried this:
 AU= getText("author") + ": " + meta.get("Artist") + "+++" + meta.get("Iptc.Copyright Notice") + "===" +  meta.get("Iptc.By-line");
But it gives this:
'Exp. date: 2014:03:28 10:05:16, Camera: SONY NEX-6, 1/200s f/8.0 ISO-100, Focal length: 44mm/66mm(35mm), Metering mode: Multi-segment, Exposure Program: Aperture priority, Flash: no, WB: Daylight, Resolution: 4912x3264, File size: 6.85 MB, © 2016 André Wolff, Author: André Wolff+++null===null'
davidekholm

Posts: 21,460
Registered: 18-Oct-2002
Re: jAlbum 14 mutilates Lightroom comments
Posted: 25-Jul-2017 19:08   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Good that you commented to the bug report I obviously posted in June. Let's hope they react. You should be able to grab any of these alternative variables by issuing <%= meta.get("Iptc.By-line") %> for instance.
AndreWolff

Posts: 2,141
Registered: 14-Dec-2007
Re: jAlbum 14 mutilates Lightroom comments
Posted: 25-Jul-2017 19:16   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
You should be able to grab any of these alternative variables by issuing <%= meta.get("Iptc.By-line") %> for instance.
No that is not working:
I did change public String getExifInfo() in init.bsh of the Slide Show 4 skin with the code showed as answer to jGromits post above.
karlmistelberger

Posts: 734
Registered: 5-Dec-2013
Re: jAlbum 14 mutilates Lightroom comments
Posted: 25-Jul-2017 19:38   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
Also, if you feel this is a bug in the existing metadata-extractor library, please post a report about it to the metadata-extractor GitHub repository.
I think you did this already: see here and here.

Instead of claiming a bug you might be better off with posing a question:

"The quickest way to have your questions answered is via Stack Overflow. Check whether your question has already been asked, and if not, ask a new one tagged with both metadata-extractor and java."
RobM

Posts: 4,382
Registered: 4-Aug-2006
Re: jAlbum 14 mutilates Lightroom comments
Posted: 25-Jul-2017 21:01   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
I tried this:
 AU= getText("author") + ": " + meta.get("Artist") + "+++" + meta.get("Iptc.Copyright Notice") + "===" +  meta.get("Iptc.By-line");
But it gives this:
'Exp. date: 2014:03:28 10:05:16, Camera: SONY NEX-6, 1/200s f/8.0 ISO-100, Focal length: 44mm/66mm(35mm), Metering mode: Multi-segment, Exposure Program: Aperture priority, Flash: no, WB: Daylight, Resolution: 4912x3264, File size: 6.85 MB, © 2016 André Wolff, Author: André Wolff+++null===null'
I used
Artist = "  + meta.get("Artist") + "<br>Iptc.Copyright Notice = " + meta.get("Iptc.Copyright Notice") + "<br>Iptc.By-line = " +  meta.get("Iptc.By-line") %>
Which gave
Artist = André Wolff
Iptc.Copyright Notice = Copyright © André Wolff
Iptc.By-line = André Wolff
Windows default encoding is mutilating your data, why don't you change your Windows environment to use UTF8?
AndreWolff

Posts: 2,141
Registered: 14-Dec-2007
Re: jAlbum 14 mutilates Lightroom comments
Posted: 25-Jul-2017 23:40   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Windows default encoding is mutilating your data, why don't you change your Windows environment to use UTF8?
What do you mean?
I use UTF-8, see enclosed screen dumps

I do get other results:

I did insert in function getExifInfo() in init.bsh of the Slide Show 4 skin:
 bv= meta.get("Iptc.By-line");
 System.out.println("Iptc.By-line: " + bv);
 bv= meta.get("Iptc.Copyright Notice");
 System.out.println("Iptc.Copyright Notice: " + bv);
 bv= writer;
 System.out.println("writer: " + bv);
 bv= photographer;
 System.out.println("photographer: " + bv);
  bv= copyright;
 System.out.println("copyright: " + bv);
 bv= meta.get("Artist");
 System.out.println("Artist: " + bv);

If I make an album the console shows this:
Iptc.By-line: null
Iptc.Copyright Notice: null
writer: null
photographer: 
copyright: null
Artist: André Wolff
Iptc.By-line: null
Iptc.Copyright Notice: null
writer: null
photographer: 
copyright: null
Artist: André Wolff


Edited by: AndreWolff on 26-Jul-2017 00:16
RobM

Posts: 4,382
Registered: 4-Aug-2006
Re: jAlbum 14 mutilates Lightroom comments
Posted: 26-Jul-2017 00:29   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
RobM wrote:
Windows default encoding is mutilating your data, why don't you change your Windows environment to use UTF8?
What do you mean?
I use UTF-8, see enclosed screen dumps
From David's post earlier "The current metadata-extractor however relies solely on the platform's default encoding, which on Windows is "Cp1252" and on Mac "UTF-8", this is why it worked on Mac cause your sample images had their EXIF strings UTF-8 encoded."
AndreWolff

Posts: 2,141
Registered: 14-Dec-2007
Re: jAlbum 14 mutilates Lightroom comments
Posted: 26-Jul-2017 00:35   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
The results depend on the used images:

I did insert in function getExifInfo() in init.bsh of the Slide Show 4 skin:
 bv= meta.get("Iptc.By-line");
 System.out.println("Iptc.By-line: " + bv);
 bv= meta.get("Iptc.Copyright Notice");
 System.out.println("Iptc.Copyright Notice: " + bv);
 bv= writer;
 System.out.println("writer: " + bv);
 bv= photographer;
 System.out.println("photographer: " + bv);
  bv= copyright;
 System.out.println("copyright: " + bv);
 bv= meta.get("Artist");
 System.out.println("Artist: " + bv);

If I make my Sahara album (metadata not made by Lightroom) the console shows this:
Iptc.By-line: null
Iptc.Copyright Notice: null
writer: null
photographer: 
copyright: null
Artist: André Wolff
Iptc.By-line: null
Iptc.Copyright Notice: null
writer: null
photographer: 
copyright: null
Artist: André Wolff


But for my Amsterdam album (metadata made by Lightroom) I get
Iptc.By-line: André Wolff
Iptc.Copyright Notice: Copyright ©  André Wolff
writer: André Wolff
photographer: André Wolff
copyright: Copyright ©  André Wolff
Artist: André Wolff
Iptc.By-line: André Wolff
Iptc.Copyright Notice: Copyright ©  André Wolff
writer: André Wolff
photographer: André Wolff
copyright: Copyright ©  André Wolff
Artist: André Wolff


I used this to solve the problem in case the MetaData comes from Lightroom:
bv= copyright; 
   if ((bv == void) || (bv == null) || bv.equals("")) bv= meta.get("Copyright");
   if ((bv != void)&&(bv != null)) {
     if (!bv.equals("")) {
       CR = bv + ", "; 
     }
   }
 bv= writer;
 if ((bv == void) || (bv == null) || bv.equals("")) bv= meta.get("Artist");
 if ((bv != void)&&(bv != null))  {
    if (!bv.equals("")) AU= getText("author") + ": " + bv;
 }

So my Amsterdam Lightroom album is now OK,
but my Sahara EXIF only album has to wait for an improved MetaData extractor.

Edited by: AndreWolff on 26-Jul-2017 10:22
AndreWolff

Posts: 2,141
Registered: 14-Dec-2007
Re: jAlbum 14 mutilates Lightroom comments
Posted: 26-Jul-2017 00:39   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
From David's post earlier "The current metadata-extractor however relies solely on the platform's default encoding, which on Windows is "Cp1252" and on Mac "UTF-8", this is why it worked on Mac cause your sample images had their EXIF strings UTF-8 encoded."
I don't know how to change the Windows 10 default encoding and even if I knew it, I think it is not wise to change that, because you can expect in that case problems with other programs.
jAlbum should work correctly with the default Windows 10 encoding!
karlmistelberger

Posts: 734
Registered: 5-Dec-2013
Re: jAlbum 14 mutilates Lightroom comments
Posted: 26-Jul-2017 08:03   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
I don't know how to change the Windows 10 default encoding and even if I knew it, I think it is not wise to change that, because you can expect in that case problems with other programs.

Encoding is not an issue. All your different versions of metadata are displayed correctly on my system.

jAlbum should work correctly with the default Windows 10 encoding!

The Gnomes of Redmond never got it right; e.g. Detect encoding and make everything UTF-8 and many more.

"If I run the application (in Windows) using a batch file that specifies UTF-8 encoding for the JVM, I do not have this issue. When running it directly from the .jar file, characters such as "â" register as "â" in the URL on Windows despite my attempt at encoding all of my strings as UTF-8." ;-)
AndreWolff

Posts: 2,141
Registered: 14-Dec-2007
Re: jAlbum 14 mutilates Lightroom comments
Posted: 26-Jul-2017 09:10   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
Encoding is not an issue. All your different versions of metadata are displayed correctly on my system.
Of course, because you belong to the 2% of the PC users using Unix.
But I belong to the 72% of the PC users using Windows.
That is the most used platform on PC’s, so jAlbum should work correctly for this group!
The Gnomes of Redmond never got it right; e.g. Detect encoding and make everything UTF-8 and many more.
I think David should read this:

Java uses Unicode on the inside, so you don't usually need to set the encoding EXCEPT when you read/write outside resources.

So may be he can solve the problem with statements like:
URLEncoder.encode(Meta_stringToBeEncoded, "UTF-8") 
 URLEncoder.encode(Meta_stringToBeEncoded, "Cp1252")
karlmistelberger

Posts: 734
Registered: 5-Dec-2013
Re: jAlbum 14 mutilates Lightroom comments
Posted: 26-Jul-2017 09:56   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Some in depth reading: Summarized: everywhere where you have the possibility to specify the character encoding, you should make use of it and set it to UTF-8

Some dutch resource: http://jdevelopment.nl/internationalization-jsf-utf8-encoded-properties-files/

Mojibake: �én van de wijken van Curaçao heet Saliña.

Of course, because you belong to the 2% of the PC users using Unix. But I belong to the 72% of the PC users using Windows. That is the most used platform on PC’s, so jAlbum should work correctly for this group!

Windows Phone is officially dead, Windows Mobile will not be going away anywhere any time soon, and Windows 10 will follow them. Be patient!
jGromit

Posts: 33,185
Registered: 31-Jan-2006
Re: jAlbum 14 mutilates Lightroom comments
Posted: 26-Jul-2017 10:05   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
"Next year, Linux will truly break out, and increase its market share from about 1% to 1.5%."

Every year, the same story.
RobM

Posts: 4,382
Registered: 4-Aug-2006
Re: jAlbum 14 mutilates Lightroom comments
Posted: 26-Jul-2017 14:56   in response to: jGromit in response to: jGromit
Helpful
  Click to reply to this thread Reply
Would adding -Dfile.encoding="UTF-8" to the .ini file work?
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums