JavaScript, shortest JS answer so far: 57 56 characters, acccepts user input
This prompts the user for a value to compare.
function _(){return prompt().split(0).sort()+''}_()==_() If no user input is required, this can be trimmed down to 53 52 characters.
Assuming the following variables are set:
var a='test', b='sets'; you can test for it with the following:
function _(a){return a.split(0).sort()+''}_(a)==_(b) Note: this answer relies on some quirk that allowed using .split(0) instead of .split(""). This behavior no longer exists (at least in Firefox), so to get it running today, you have to replace 0 with "".