Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline Labels - handling of Carriage Return / Line Feed characters #14681

Closed
qgib opened this issue Jan 19, 2012 · 5 comments
Closed

Multiline Labels - handling of Carriage Return / Line Feed characters #14681

qgib opened this issue Jan 19, 2012 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jan 19, 2012

Author Name: Brian Freed (@bfreed)
Original Redmine Issue: 4844
Affected QGIS version: master


Windows XP, Spatialite database layers

I have some spatial views using group_concat, which I want to show up in QGIS as multiline labels, with each item on its own line.
So I define group_concat(a,';
')
to use a semicolon, new line combination.

The result is pretty much what I want, but with a square box at the end of each line except the last. I finally figured it out - Notepad++ (or Windows notepad too) inserts both a Carriage Return & a Line Feed when you hit enter in the editor. QGIS is using the LF to split the multiline labels correctly, but is displaying the CR as the boxed character.

There's a workaround - in Notepad++, you can view all characters, and turn on the ASCII Insertion Panel, and define the view with ONLY a LF and no CR, and then everything is great.

But it'd be nice if QGIS could recognize the CR|LF combination, since that seems to be the default for Windows' most common text editors (I can't speak to any other OS/editor combo).

@qgib
Copy link
Contributor Author

qgib commented Jan 28, 2012

Author Name: Nathan Woodrow (@NathanW2)


Can you see if the latest build of QGIS, which allows you to define a string to wrap on, can handle this. If you go to the Advanced tab in the label settings and set the "Wrap label on character" to

.

See if that works.

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 1.8.0 to Version 2.0.0

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2012

Author Name: Brian Freed (@bfreed)


Shoot, sorry Nathan, I forgot this one was still floating out there. The new labeling in 1.8 is fantastic. In terms of our company's use, this 'issue' is now irrelevant. Not only because of the 'wrap on character' feature, but also because being able to concatenate multiple columns in labeling means I don't have to build views with columns specifically for QGIS labels.

So old way: View definition: Column "QGIS Label" = A || '[line feed]' || B

new way: no "QGIS Label" column - in QGIS, set label as A || '/' || B, then set to wrap on '/'.

As far as I'm concerned, this is no longer an issue. Thanks!

@qgib
Copy link
Contributor Author

qgib commented May 29, 2013

Author Name: Larry Shaffer (Larry Shaffer)


  • status_id was changed from Open to Resolved

@qgib
Copy link
Contributor Author

qgib commented Feb 13, 2014

Author Name: Jürgen Fischer (@jef-n)


  • status_id was changed from Resolved to Closed

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant